com.ibm.able.platform
Interface AbleEServerJobIfc

All Known Implementing Classes:
AbleISeriesJob

public interface AbleEServerJobIfc

This is the interface that any job object managed by the AbleEServerJobService must implement.

For example: The iSeries command, STRAGTSRV, will start the platform services on the host that the command is run from. It will register an implementation of this interface with the Job Service. When ENDAGTSRV is called, it will grab implementations of this interface to know enough information about the job to be able to end it.


Field Summary
static java.lang.String INVALID_REPRESENTATION
          If the isJobObjectValid method determined that this job object does not contain the adequate information for an eServer to know what job this represents, then this is the invalid response that will be expected.
 
Method Summary
 void clear()
          Clears all of the job info in the AbleEServerJob Object
 java.lang.String getJobKey()
          In the Job Service, all jobs must supply a unique key they can register with.
 java.lang.String getStringRepresentation(java.lang.String typeExpected)
          When getting job info from the Job Service, there are times when it will be expected in a certain format.
 boolean isJobObjectValid(java.lang.String typeExpected)
          Determines if this object contains enough information for the iSeries to be able to identify this job, and if this job is of the type we are expecting.
 void load(java.lang.Object[] jobInfoArray)
          Method load
 

Field Detail

INVALID_REPRESENTATION

public static final java.lang.String INVALID_REPRESENTATION
If the isJobObjectValid method determined that this job object does not contain the adequate information for an eServer to know what job this represents, then this is the invalid response that will be expected.
Method Detail

load

public void load(java.lang.Object[] jobInfoArray)
Method load

This will take in an Obejct array. The load method on an implementation of this interface will know how to take this array and load in it's job info.

Parameters:
jobInfoArray - String array containing the info to represent an eServer job.

isJobObjectValid

public boolean isJobObjectValid(java.lang.String typeExpected)
Determines if this object contains enough information for the iSeries to be able to identify this job, and if this job is of the type we are expecting.

In the iSeries case, the user, number, and name must all not be null the jobKey is also checked because it must be present to be registered.

Parameters:
typeExpected - The type of Object we expect to be dealing with. Set to null if this should not be checked.

Returns:
boolean true when valid, otherwise false.

getJobKey

public java.lang.String getJobKey()
In the Job Service, all jobs must supply a unique key they can register with.

getStringRepresentation

public java.lang.String getStringRepresentation(java.lang.String typeExpected)
When getting job info from the Job Service, there are times when it will be expected in a certain format. This method will return a string in the format that is expected.

If there is not enough information to be able to identify this eServer job, or the job doesn't not match typeExcpeted then the INVALID_REPRESENTATION String will be returned.

Ex: For iSeries, to make the JNI calls easier, we pass the job info back in this String and it is expected to be in a certain format: "number user name" where the number would be padded to 6, user to 10, name to 10.

Parameters:
typeExpected - The type of Object we expect to be dealing with. Set to null if this should not be checked.

Returns:
A String representation of the job.

clear

public void clear()
Clears all of the job info in the AbleEServerJob Object