com.ibm.able.platform
Class RmiAbleEServerJobSystem

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--org.jagent.service.util.RMIBasicService
              |
              +--com.ibm.able.platform.AbleBasicService
                    |
                    +--com.ibm.able.platform.RmiAbleEServerJobSystem
All Implemented Interfaces:
AblePersistenceSupportProcessor, org.jagent.service.IPService, java.rmi.Remote, RmiAbleEServerJobService, RmiAblePlatformService, RmiAblePlatformServiceEventGenerator, org.jagent.service.RMIService, java.io.Serializable, javax.agent.service.Service

public final class RmiAbleEServerJobSystem
extends AbleBasicService
implements RmiAbleEServerJobService, AblePersistenceSupportProcessor

This is the implementation of an RMI-based eServer Job Service.

A Job Service is used to register and deregister platform jobs.

One use of this service is the iSeries startup code where it will be used to keep track of each platform job so the platform can easily be brought back down.

See Also:
Serialized Form

Fields inherited from class com.ibm.able.platform.AbleBasicService
ANS_PRINCIPAL, LOCAL_PRINCIPAL, myAnsPrincipal, myKeyPair, myMsgLog, myPrincipal, mySecSppt, myServiceEventListeners, myServiceProperties, myTrcLog, myTrustLevel, myVerifiableAgentName, myVerifiableNamingService, Refreshing, REQUESTORS_PORT, Running, SOCKET_FACTORY, Terminated, Unknown
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface org.jagent.service.RMIService
RMI, SERVICE_PROTOCOL
 
Fields inherited from interface org.jagent.service.IPService
SERVICE_HOST, SERVICE_PORT
 
Constructor Summary
RmiAbleEServerJobSystem()
          Create an instance of an RMI-based eServer Job Service.
RmiAbleEServerJobSystem(javax.agent.service.ServiceProperties theServiceProperties)
          Create an instance of an RMI-based eServer Job Service, using the specified service properties.
 
Method Summary
 void deregisterJob(AbleEServerJobIfc job, AbleSecureKey key)
          This is the method that is used to deregister a job from the Job Service.
 java.lang.String getBindingName()
          Abstract method from org.jagent.service.util.RMIBasicService
 AbleEServerJobIfc getJobInfo(java.lang.String theJobKey)
          Returns the AbleEServerJobIfc that is registered to job key theJobKey.
 void refreshLocalFromPersistence(AblePersistenceSupport thePersistenceSupport, java.lang.Object[] persistedRecords)
          Takes the persisted Objects that are read in, and sets them locally.
 void registerJob(AbleEServerJobIfc job, AbleSecureKey key)
          This is the method that is used to register a job to the Job Service.
 void terminateService(AbleSecureKey key)
          Secure method the EServer Job service will use to clean up it's PersistenceSupport.
 
Methods inherited from class com.ibm.able.platform.AbleBasicService
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, getState, notifyAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener, setState, thenNotifyAblePlatformServiceEventListeners
 
Methods inherited from class org.jagent.service.util.RMIBasicService
bindServiceToRegistry, getServiceProperties, setServiceProperties, shutdown
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.able.platform.RmiAblePlatformService
getState
 
Methods inherited from interface com.ibm.able.platform.RmiAblePlatformServiceEventGenerator
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener
 

Constructor Detail

RmiAbleEServerJobSystem

public RmiAbleEServerJobSystem()
                        throws java.lang.Exception
Create an instance of an RMI-based eServer Job Service.

Throws:
java.lang.Exception -

On any error initializing the super class.

On any error binding this service.


RmiAbleEServerJobSystem

public RmiAbleEServerJobSystem(javax.agent.service.ServiceProperties theServiceProperties)
                        throws java.lang.Exception
Create an instance of an RMI-based eServer Job Service, using the specified service properties.

Parameters:
theServiceProperties - Service properties on which the service is based.

Throws:
java.lang.Exception -

On any error initializing the super class.

On any error binding this service.

Method Detail

getBindingName

public java.lang.String getBindingName()
Abstract method from org.jagent.service.util.RMIBasicService

Overrides:
getBindingName in class org.jagent.service.util.RMIBasicService
Returns:
String the binding name for this remote object

terminateService

public void terminateService(AbleSecureKey key)
                      throws com.ibm.able.AbleException,
                             javax.agent.service.naming.NamingException
Secure method the EServer Job service will use to clean up it's PersistenceSupport.

Specified by:
terminateService in interface RmiAblePlatformService
Overrides:
terminateService in class AbleBasicService
Parameters:
key - The key that is used to secure this communication

Throws:
AbleException - If the caller is not authorized.

javax.agent.service.naming.NamingException -

If the caller is not authenticated.

On all errors generating an AbleSecureKey.

On all errors calling the super terminateService.


refreshLocalFromPersistence

public void refreshLocalFromPersistence(AblePersistenceSupport thePersistenceSupport,
                                        java.lang.Object[] persistedRecords)
                                 throws java.lang.Exception
Description copied from interface: AblePersistenceSupportProcessor
Takes the persisted Objects that are read in, and sets them locally.

This method is called one time during the lifetime of this AblePersistenceSupportProcessor Object. This method will be called the first time a successful connection is made to the PlatformPersistenceService and the persisted Objects are read in.

Specified by:
refreshLocalFromPersistence in interface AblePersistenceSupportProcessor
Following copied from interface: com.ibm.able.platform.AblePersistenceSupportProcessor
Parameters:
thePersistenceSupport - the object making the callback so that the processor can tell which AblePersistenceSupport object is making the call.

persistedRecords - Object[] containing all of the rows of the table this Object persists to.

Throws:
java.lang.Exception - On any error locally restoring the persisted data.

registerJob

public void registerJob(AbleEServerJobIfc job,
                        AbleSecureKey key)
                 throws java.rmi.RemoteException,
                        AbleEServerJobException
Description copied from interface: RmiAbleEServerJobService
This is the method that is used to register a job to the Job Service.

Specified by:
registerJob in interface RmiAbleEServerJobService
Following copied from interface: com.ibm.able.platform.RmiAbleEServerJobService
Parameters:
job - The AbleEServerJobIfc job that is to be registered.

key - AbleSecureKey to secure communication

Throws:
java.rmi.RemoteException - On all remote errors.

AbleEServerJobException -

If the caller is not authenticated.

If attempting to register an invalid AbleEServerJobIfc Object.

If there is an existing job registered to the job key of job.


deregisterJob

public void deregisterJob(AbleEServerJobIfc job,
                          AbleSecureKey key)
                   throws java.rmi.RemoteException,
                          AbleEServerJobException
Description copied from interface: RmiAbleEServerJobService
This is the method that is used to deregister a job from the Job Service.

If the platform is running secure, the caller must have an authority level equal to or greater than the one who originally registered the job that is to be removed.

Calls to this method may be delegated, but the VerifiableAgentName at every hop along the way must be authenticated and authorized.

Specified by:
deregisterJob in interface RmiAbleEServerJobService
Following copied from interface: com.ibm.able.platform.RmiAbleEServerJobService
Parameters:
job - The AbleEServerJobIfc job that is to be deregistered.

key - AbleSecureKey to secure communication

Throws:
java.rmi.RemoteException - On all remote errors.

AbleEServerJobException -

If the caller is not authenticated.

If attempting to deregister an invalid AbleEServerJobIfc Object.

If there is not an existing job registered to the job key of job.

If the caller is not authorized.


getJobInfo

public AbleEServerJobIfc getJobInfo(java.lang.String theJobKey)
                             throws java.rmi.RemoteException,
                                    AbleEServerJobException
Description copied from interface: RmiAbleEServerJobService
Returns the AbleEServerJobIfc that is registered to job key theJobKey.

Specified by:
getJobInfo in interface RmiAbleEServerJobService
Following copied from interface: com.ibm.able.platform.RmiAbleEServerJobService
Parameters:
theJobKey - The job key of the AbleEServerJobIfc that is to be returned.

Returns:
AbleEServerJobIfc Object registered to job key theJobKey.

Throws:
java.rmi.RemoteException - On all remote errors.

AbleEServerJobException -

If theJobKey is null.

If no Job is registered to key theJobKey.