com.ibm.as400.resource
Class RJavaProgram
- java.lang.Object
-
- com.ibm.as400.resource.Resource
-
- com.ibm.as400.resource.ChangeableResource
-
- com.ibm.as400.resource.RJavaProgram
-
- All Implemented Interfaces:
- java.io.Serializable
Deprecated.UseJavaProgram
instead, as this package may be removed in the future.
public class RJavaProgram extends ChangeableResource
Represents a Java program on the system. This is supported only when connecting to systems running OS/400 V5R1, and is not supported beyond IBM i 7.1.In the context of this discussion, a "Java program" is the IBM i executable object that is created when the CRTJVAPGM (Create Java Program) CL command is run against a class, JAR, or ZIP file.
The following attribute IDs are supported:
CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
CLASSES_WITH_CURRENT_JAVA_PROGRAMS
CLASSES_WITH_ERRORS
ENABLE_PERFORMANCE_COLLECTION
FILE_CHANGE
JAVA_PROGRAMS
JAVA_PROGRAM_CREATION
JAVA_PROGRAM_SIZE
LICENSED_INTERNAL_CODE_OPTIONS
OPTIMIZATION
OWNER
PROFILING_DATA
RELEASE_PROGRAM_CREATED_FOR
TOTAL_CLASSES_IN_SOURCE
USE_ADOPTED_AUTHORITY
USER_PROFILE
Use any of these attribute IDs with
getAttributeValue()
andsetAttributeValue()
to access the attribute values for an RJavaProgram.// Create an RJavaProgram object to refer to a specific Java program. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RJavaProgram javaProgram = new RJavaProgram(system, "/home/mydir/HelloWorld.class");
// Get the optimization. Integer optimization = (Integer)javaProgram.getAttributeValue(RJavaProgram.OPTIMIZATION);
// Set the enable peformance collection attribute value to full. javaProgram.setAttributeValue(RJavaProgram.ENABLE_PERFORMANCE_COLLECTION, RJavaProgram.ENABLE_PERFORMANCE_COLLECTION_FULL);
// Commit the attribute change. javaProgram.commitAttributeChanges();- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
CLASSES_WITH_CURRENT_JAVA_PROGRAMS
Deprecated.Attribute ID for classes with current Java programs.static java.lang.String
CLASSES_WITH_ERRORS
Deprecated.Attribute ID for classes with errors.static java.lang.String
CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
Deprecated.Attribute ID for classes without current Java programs.static java.lang.String
ENABLE_PERFORMANCE_COLLECTION
Deprecated.Attribute ID for enable performance collection.static java.lang.String
ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
Deprecated.Attribute value indicating that the entry/exit information on all the procedures of the Java program (including those that are leaf procedures) is given.static java.lang.String
ENABLE_PERFORMANCE_COLLECTION_FULL
Deprecated.Attribute value indicating that the entry/exit information on all procedures of the Java program (including those that are leaf procedures) and precall and postcall hooks around calls to other procedures is given.static java.lang.String
ENABLE_PERFORMANCE_COLLECTION_NONE
Deprecated.Attribute value indicating that no performance collection is enabled for this Java program.static java.lang.String
FILE_CHANGE
Deprecated.Attribute ID for file change.static java.lang.String
JAVA_PROGRAM_CREATION
Deprecated.Attribute ID for Java program creation.static java.lang.String
JAVA_PROGRAM_SIZE
Deprecated.Attribute ID for Java program size.static java.lang.String
JAVA_PROGRAMS
Deprecated.Attribute ID for Java programs.static java.lang.String
LICENSED_INTERNAL_CODE_OPTIONS
Deprecated.Attribute ID for licensed internal code options.static java.lang.String
NO
Deprecated.Attribute value for no.static java.lang.String
OPTIMIZATION
Deprecated.Attribute ID for optimization.static java.lang.Integer
OPTIMIZATION_10
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes but has only minimal additional compiler optimization.static java.lang.Integer
OPTIMIZATION_20
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has some additional compiler optimization.static java.lang.Integer
OPTIMIZATION_30
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 20.static java.lang.Integer
OPTIMIZATION_40
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 30.static java.lang.Integer
OPTIMIZATION_INTERPRET
Deprecated.Attribute value indicating that the Java program is not optimized.static java.lang.String
OWNER
Deprecated.Attribute ID for owner.static java.lang.String
PROFILING_DATA
Deprecated.Attribute ID for profiling data.static java.lang.String
PROFILING_DATA_APPLY
Deprecated.Attribute value indicating that profiling data collection is applied for this Java program.static java.lang.String
PROFILING_DATA_CLEAR
Deprecated.Attribute value indicating that all profiling data that has been collected for this Java program is to be cleared.static java.lang.String
PROFILING_DATA_COLLECTION
Deprecated.Attribute value indicating that profiling data collection is enabled for this Java program.static java.lang.String
PROFILING_DATA_NOCOLLECTION
Deprecated.Attribute value indicating that no profiling data collection is enabled for this Java program.static java.lang.String
RELEASE_PROGRAM_CREATED_FOR
Deprecated.Attribute ID for release program created for.static java.lang.String
TOTAL_CLASSES_IN_SOURCE
Deprecated.Attribute ID for total classes in source.static java.lang.String
USE_ADOPTED_AUTHORITY
Deprecated.Attribute ID for use adopted authority.static java.lang.String
USER_PROFILE
Deprecated.Attribute ID for user profile.static java.lang.String
USER_PROFILE_OWNER
Deprecated.Attribute value indicating that the authority checking that was done while this program is running should include both the use who is running the program and the program owner.static java.lang.String
USER_PROFILE_USER
Deprecated.Attribute value indicating that the authority checking that was done while this program is running should include only the user who is running the program.static java.lang.String
YES
Deprecated.Attribute value for yes.
-
Constructor Summary
Constructors Constructor and Description RJavaProgram()
Deprecated.Constructs an RJavaProgram object.RJavaProgram(AS400 system, java.lang.String path)
Deprecated.Constructs an RJavaProgram object.
-
Method Summary
Methods Modifier and Type Method and Description protected void
commitAttributeChanges(java.lang.Object[] attributeIDs, java.lang.Object[] values)
Deprecated.Commits the specified attribute changes.void
delete()
Deprecated.Deletes the Java program.protected void
establishConnection()
Deprecated.Establishes the connection to the system.protected void
freezeProperties()
Deprecated.Freezes any property changes.java.lang.Object
getAttributeUnchangedValue(java.lang.Object attributeID)
Deprecated.Returns the unchanged value of an attribute.java.lang.String
getPath()
Deprecated.Returns the path.void
refreshAttributeValues()
Deprecated.Refreshes the values for all attributes.void
setPath(java.lang.String path)
Deprecated.Sets the path.java.lang.String
toString()
Deprecated.Returns the path.-
Methods inherited from class com.ibm.as400.resource.ChangeableResource
cancelAttributeChanges, commitAttributeChanges, commitAttributeChanges, fireAttributeChangesCanceled, fireAttributeChangesCommitted, fireAttributeValueChanged, fireResourceCreated, fireResourceDeleted, getAttributeUnchangedValue, getAttributeValue, getAttributeValue, hasUncommittedAttributeChanges, initializeAttributeValue, setAttributeValue, setAttributeValue
-
Methods inherited from class com.ibm.as400.resource.Resource
addActiveStatusListener, addPropertyChangeListener, addResourceListener, addVetoableChangeListener, arePropertiesFrozen, equals, fireAttributeValuesRefreshed, fireBusy, fireIdle, firePropertyChange, fireVetoableChange, getAttributeMetaData, getAttributeMetaData, getPresentation, getResourceKey, getSystem, isBidiEnabled, isConnectionEstablished, removeActiveStatusListener, removePropertyChangeListener, removeResourceListener, removeVetoableChangeListener, setPresentation, setResourceKey, setSystem
-
-
-
-
Field Detail
-
YES
public static final java.lang.String YES
Deprecated.Attribute value for yes.- See Also:
- Constant Field Values
-
NO
public static final java.lang.String NO
Deprecated.Attribute value for no.- See Also:
- Constant Field Values
-
TOTAL_CLASSES_IN_SOURCE
public static final java.lang.String TOTAL_CLASSES_IN_SOURCE
Deprecated.Attribute ID for total classes in source. This identifies a read-only Integer attribute, which represents the total number of classes located within the ZIP or JAR file.- See Also:
- Constant Field Values
-
CLASSES_WITH_ERRORS
public static final java.lang.String CLASSES_WITH_ERRORS
Deprecated.Attribute ID for classes with errors. This identifies a read-only Integer attribute, which represents the number of classes in the file that contain errors.- See Also:
- Constant Field Values
-
CLASSES_WITH_CURRENT_JAVA_PROGRAMS
public static final java.lang.String CLASSES_WITH_CURRENT_JAVA_PROGRAMS
Deprecated.Attribute ID for classes with current Java programs. This identifies a read-only Integer attribute, which represents the number of classes in the file which have current Java programs.- See Also:
- Constant Field Values
-
CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
public static final java.lang.String CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
Deprecated.Attribute ID for classes without current Java programs. This identifies a read-only Integer attribute, which represents the number of classes in the file which do not have current Java programs.- See Also:
- Constant Field Values
-
ENABLE_PERFORMANCE_COLLECTION
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION
Deprecated.Attribute ID for enable performance collection. This identifies a String attribute, which represents the level of performance data collection allowed for this Java program. Possible values are:ENABLE_PERFORMANCE_COLLECTION_NONE
- No performance collection is enabled for this Java program.ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
- This gives the entry/exit information on all the procedures of the Java program (including those that are leaf procedures). This includes the PEP routine. This is useful in capturing information on all procedures.ENABLE_PERFORMANCE_COLLECTION_FULL
- This gives the entry/exit information on all procedures of the Java program (including those that are leaf procedures) and precall and postcall hooks around calls to other procedures. This is useful in capturing information on all procedures.
- See Also:
- Constant Field Values
-
ENABLE_PERFORMANCE_COLLECTION_NONE
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_NONE
Deprecated.Attribute value indicating that no performance collection is enabled for this Java program.
-
ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
Deprecated.Attribute value indicating that the entry/exit information on all the procedures of the Java program (including those that are leaf procedures) is given. This includes the PEP routine. This is useful in capturing information on all procedures.
-
ENABLE_PERFORMANCE_COLLECTION_FULL
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_FULL
Deprecated.Attribute value indicating that the entry/exit information on all procedures of the Java program (including those that are leaf procedures) and precall and postcall hooks around calls to other procedures is given. This is useful in capturing information on all procedures.
-
PROFILING_DATA
public static final java.lang.String PROFILING_DATA
Deprecated.Attribute ID for profiling data. This identifies a String attribute, which indicates if the Java program is collecting profiling data. Possible values are:PROFILING_DATA_NOCOLLECTION
- No profiling data collection is enabled for this Java program.PROFILING_DATA_COLLECTION
- Profiling data collection is enabled for this Java program. This enablement can only occur if the optimization of the Java program is 30 or higher. Also, collection does not occur until the profiling data is applied.PROFILING_DATA_APPLY
- Profiling data collection is applied for this Java program.PROFILING_DATA_CLEAR
- All profiling data that has been collected for this Java program is to be cleared.
- See Also:
- Constant Field Values
-
PROFILING_DATA_NOCOLLECTION
public static final java.lang.String PROFILING_DATA_NOCOLLECTION
Deprecated.Attribute value indicating that no profiling data collection is enabled for this Java program.- See Also:
PROFILING_DATA
, Constant Field Values
-
PROFILING_DATA_COLLECTION
public static final java.lang.String PROFILING_DATA_COLLECTION
Deprecated.Attribute value indicating that profiling data collection is enabled for this Java program. This enablement can only occur if the optimization of the Java program is 30 or higher. Also, collection does not occur until the profiling data is applied.- See Also:
PROFILING_DATA
, Constant Field Values
-
PROFILING_DATA_APPLY
public static final java.lang.String PROFILING_DATA_APPLY
Deprecated.Attribute value indicating that profiling data collection is applied for this Java program.- See Also:
PROFILING_DATA
, Constant Field Values
-
PROFILING_DATA_CLEAR
public static final java.lang.String PROFILING_DATA_CLEAR
Deprecated.Attribute value indicating that all profiling data that has been collected for this Java program is to be cleared.- See Also:
PROFILING_DATA
, Constant Field Values
-
FILE_CHANGE
public static final java.lang.String FILE_CHANGE
Deprecated.Attribute ID for file change. This identifies a read-only Date attribute, which represents the date and time when the file was last changed. The Date value is converted using the default Java locale.- See Also:
- Constant Field Values
-
JAVA_PROGRAMS
public static final java.lang.String JAVA_PROGRAMS
Deprecated.Attribute ID for Java programs. This identifies a read-only Integer attribute, which represents the number of Java programs associated with the file.- See Also:
- Constant Field Values
-
JAVA_PROGRAM_CREATION
public static final java.lang.String JAVA_PROGRAM_CREATION
Deprecated.Attribute ID for Java program creation. This identifies a read-only Date attribute, which represents the date and time when the Java program was created. If this is a zip or jar file, this is the date and time when the first Java program was attached to the file. If this is class file, this is the date and time when the Java program was created. The Date value is converted using the default Java locale.- See Also:
- Constant Field Values
-
JAVA_PROGRAM_SIZE
public static final java.lang.String JAVA_PROGRAM_SIZE
Deprecated.Attribute ID for Java program size. This identifies a read-only Long attribute, which represents the size, in kilobytes, of the Java programs that are attached to the file.- See Also:
- Constant Field Values
-
LICENSED_INTERNAL_CODE_OPTIONS
public static final java.lang.String LICENSED_INTERNAL_CODE_OPTIONS
Deprecated.Attribute ID for licensed internal code options. This identifies a String attribute, which represents the selected licensed internal code (LIC) compile-time options that are used when the Java program was created.- See Also:
- Constant Field Values
-
OPTIMIZATION
public static final java.lang.String OPTIMIZATION
Deprecated.Attribute ID for optimization. This identifies an Integer attribute, which represents the optimization level of the Java program. Possible values are:OPTIMIZATION_INTERPRET
- The Java program is not optimized. When invoked, the Java program interprets the class file byte codes. Variables can be displayed and modified while debugging.OPTIMIZATION_10
- The Java program contains a compiled version of the class file byte codes but has only minimal additional compiler optimization. Variables can be displayed and modified while debugging.OPTIMIZATION_20
- The Java program contains a compiled version of the class file byte codes and has some additional compiler optimization. Variables can be displayed but not modified while debugging.OPTIMIZATION_30
- The Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 20. During a debug session, user variables cannot be changed, but can be displayed. The presented values may not be the current values of the variables.OPTIMIZATION_40
- The Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 30. All call and instruction tracing is disabled.
- See Also:
- Constant Field Values
-
OPTIMIZATION_INTERPRET
public static final java.lang.Integer OPTIMIZATION_INTERPRET
Deprecated.Attribute value indicating that the Java program is not optimized. When invoked, the Java program interprets the class file byte codes. Variables can be displayed and modified while debugging.- See Also:
OPTIMIZATION
-
OPTIMIZATION_10
public static final java.lang.Integer OPTIMIZATION_10
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes but has only minimal additional compiler optimization. Variables can be displayed and modified while debugging.- See Also:
OPTIMIZATION
-
OPTIMIZATION_20
public static final java.lang.Integer OPTIMIZATION_20
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has some additional compiler optimization. Variables can be displayed but not modified while debugging.- See Also:
OPTIMIZATION
-
OPTIMIZATION_30
public static final java.lang.Integer OPTIMIZATION_30
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 20. During a debug session, user variables cannot be changed, but can be displayed. The presented values may not be the current values of the variables.- See Also:
OPTIMIZATION
-
OPTIMIZATION_40
public static final java.lang.Integer OPTIMIZATION_40
Deprecated.Attribute value indicating that the Java program contains a compiled version of the class file byte codes and has more compiler optimization than optimization level 30. All call and instruction tracing is disabled.- See Also:
OPTIMIZATION
-
OWNER
public static final java.lang.String OWNER
Deprecated.Attribute ID for owner. This identifies a read-only String attribute, which represents the owner of the Java program.- See Also:
- Constant Field Values
-
RELEASE_PROGRAM_CREATED_FOR
public static final java.lang.String RELEASE_PROGRAM_CREATED_FOR
Deprecated.Attribute ID for release program created for. This identifies a read-only String attribute, which represents the release of the operating system for which the object was created.- See Also:
- Constant Field Values
-
USE_ADOPTED_AUTHORITY
public static final java.lang.String USE_ADOPTED_AUTHORITY
Deprecated.Attribute ID for use adopted authority. This identifies a read-only String attribute, which indicates if the Java programs use adopted authority from previous call levels in the stack. Possible values are:- See Also:
- Constant Field Values
-
USER_PROFILE
public static final java.lang.String USER_PROFILE
Deprecated.Attribute ID for user profile. This identifies a read-only String attribute, which represents who the authority checking that was done while this program is running should include. Possible values are:USER_PROFILE_USER
- Indicates that the authority checking that was done while this program is running should include only the user who is running the program.USER_PROFILE_OWNER
- Indicates that the authority checking that was done while this program is running should include both the use who is running the program and the program owner.
- See Also:
- Constant Field Values
-
USER_PROFILE_USER
public static final java.lang.String USER_PROFILE_USER
Deprecated.Attribute value indicating that the authority checking that was done while this program is running should include only the user who is running the program.- See Also:
USER_PROFILE
, Constant Field Values
-
USER_PROFILE_OWNER
public static final java.lang.String USER_PROFILE_OWNER
Deprecated.Attribute value indicating that the authority checking that was done while this program is running should include both the use who is running the program and the program owner.- See Also:
USER_PROFILE
, Constant Field Values
-
-
Constructor Detail
-
RJavaProgram
public RJavaProgram()
Deprecated.Constructs an RJavaProgram object.
-
RJavaProgram
public RJavaProgram(AS400 system, java.lang.String path)
Deprecated.Constructs an RJavaProgram object.- Parameters:
system
- The system.path
- The path. This can be any class, jar, or zip file.
-
-
Method Detail
-
commitAttributeChanges
protected void commitAttributeChanges(java.lang.Object[] attributeIDs, java.lang.Object[] values) throws ResourceException
Deprecated.Commits the specified attribute changes.- Overrides:
commitAttributeChanges
in classChangeableResource
- Parameters:
attributeIDs
- The attribute IDs for the specified attribute changes.values
- The specified attribute changes- Throws:
ResourceException
- If an error occurs.- See Also:
- Subclass notes
-
delete
public void delete() throws ResourceException
Deprecated.Deletes the Java program. This does not delete the class, jar, or zip file.- Throws:
ResourceException
- If an error occurs.
-
establishConnection
protected void establishConnection() throws ResourceException
Deprecated.Establishes the connection to the system.The method is called by the resource framework automatically when the connection needs to be established.
- Overrides:
establishConnection
in classResource
- Throws:
ResourceException
- If an error occurs.
-
freezeProperties
protected void freezeProperties() throws ResourceException
Deprecated.Freezes any property changes. After this is called, property changes should not be made. Properties are not the same thing as attributes. Properties are basic pieces of information which must be set to make the object usable, such as the system and path.The method is called by the resource framework automatically when the properties need to be frozen.
- Overrides:
freezeProperties
in classResource
- Throws:
ResourceException
- If an error occurs.
-
getAttributeUnchangedValue
public java.lang.Object getAttributeUnchangedValue(java.lang.Object attributeID) throws ResourceException
Deprecated.Returns the unchanged value of an attribute. If the attribute value has a uncommitted change, this returns the unchanged value. If the attribute value does not have a uncommitted change, this returns the same value as getAttributeValue().- Overrides:
getAttributeUnchangedValue
in classChangeableResource
- Parameters:
attributeID
- Identifies the attribute.- Returns:
- The attribute value, or null if the attribute value is not available.
- Throws:
ResourceException
- If an error occurs.- See Also:
- Subclass notes
-
getPath
public java.lang.String getPath()
Deprecated.Returns the path.- Returns:
- The path.
-
refreshAttributeValues
public void refreshAttributeValues() throws ResourceException
Deprecated.Refreshes the values for all attributes. This does not cancel uncommitted changes. This method fires an attributeValuesRefreshed() ResourceEvent.- Overrides:
refreshAttributeValues
in classChangeableResource
- Throws:
ResourceException
- If an error occurs.
-
setPath
public void setPath(java.lang.String path)
Deprecated.Sets the path. This does not change the Java program on the system. Instead, it changes the Java program that this object references.- Parameters:
path
- The path. This can be any class, jar, or zip file.
-
-