|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.platform.RmiAbleEServerJobServiceProxy
An RMI Job Service proxy contains a reference to an RMI version of a Job Service. The proxy contains methods identical to the methods in the actual service. When a method is called on the proxy, the proxy forwards the call on to the actual service. However, the proxy (1) traps all RemoteExceptions that might be thrown by the service, (2) turns the RemoteExceptions into AbleEServerJobExceptions, and then (3) rethrows the new exception. In this way, code making use of the proxy does not have to be sensitive to RMI RemoteExceptions and can code to a common Agent Life Cycle Service interface.
Fields inherited from interface com.ibm.able.platform.AbleEServerJobService |
COLUMN_NAMES, COLUMN_TYPES, SERVICE_PATH, SERVICE_TYPE |
Constructor Summary | |
RmiAbleEServerJobServiceProxy(RmiAbleEServerJobService theDelegate,
java.rmi.registry.Registry theRegistry,
java.lang.String theAddress)
Create a proxy over the specified RMI reference to an Able EServer Job Service. |
Method Summary | |
void |
addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
Adds a service event listener to this service. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
void |
deregisterJob(AbleEServerJobIfc job,
AbleSecureKey key)
This is the method that is used to deregister a job from the Job Service. |
java.util.Vector |
getAblePlatformServiceEventListeners()
Gets a collection of all service event listeners registered with this service event generator. |
AbleEServerJobIfc |
getJobInfo(java.lang.String theJobKey)
Returns the AbleEServerJobIfc that is registered to job key theJobKey . |
javax.agent.service.ServiceProperties |
getServiceProperties()
Retrieve the service properties of the underlying service. |
int |
getState()
Returns the state of this service. |
void |
registerJob(AbleEServerJobIfc job,
AbleSecureKey key)
This is the method that is used to register a job to the Job Service. |
void |
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
Removes a service event listener from this service. |
void |
setServiceProperties(javax.agent.service.ServiceProperties theServiceProperties)
Set the service properties of the underlying service. |
void |
terminateService(AbleSecureKey theSecureKey)
Terminates this service in a controlled way; the service is removed from the service root and, if necessary, unbound from the RMI registry and unexported as a remote RMI object. |
java.lang.String |
toString()
Returns a String representation of this RmiAbleEServerJobServiceProxy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RmiAbleEServerJobServiceProxy(RmiAbleEServerJobService theDelegate, java.rmi.registry.Registry theRegistry, java.lang.String theAddress)
theDelegate
- A reference to an RMI version of an Able EServer Job
Service.
theRegistry
- The RMI registry at which the above Able EServer Job
Service is registered.
theAddress
- The RMI address at which the above Able EServer Job
Service is registered.
Method Detail |
public javax.agent.service.ServiceProperties getServiceProperties()
Note: In this implementation, the method call is not forwarded on to the service; null is always returned.
getServiceProperties
in interface javax.agent.service.Service
public void setServiceProperties(javax.agent.service.ServiceProperties theServiceProperties)
Note: In this implementation, the method call is not forwarded on to the service; the call is simply ignored.
setServiceProperties
in interface javax.agent.service.Service
theServiceProperties
- The service properties to be used by the service.
public void addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener) throws com.ibm.able.AbleException
AblePlatformServiceEventGenerator
addAblePlatformServiceEventListener
in interface AblePlatformServiceEventGenerator
com.ibm.able.platform.AblePlatformServiceEventGenerator
theListener
- Any object interested in listening for service events
generated by this service.
AbleException
- If the listener to be added is null.
On any error.
public void removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener) throws com.ibm.able.AbleException
AblePlatformServiceEventGenerator
removeAblePlatformServiceEventListener
in interface AblePlatformServiceEventGenerator
com.ibm.able.platform.AblePlatformServiceEventGenerator
theListener
- A previously registered object that is no longer
interested in listening for service events generated
by this service.
AbleException
- If the listener to be removed is null.
On any error.
public java.util.Vector getAblePlatformServiceEventListeners() throws com.ibm.able.AbleException
AblePlatformServiceEventGenerator
getAblePlatformServiceEventListeners
in interface AblePlatformServiceEventGenerator
com.ibm.able.platform.AblePlatformServiceEventGenerator
AbleException
- On any error.public void terminateService(AbleSecureKey theSecureKey) throws com.ibm.able.AbleException, javax.agent.service.naming.NamingException
AblePlatformService
terminateService
in interface AblePlatformService
com.ibm.able.platform.AblePlatformService
theSecureKey
- When security if off, this may be null as the
parameter is ignored; when security is on the security
key must be from an object with equal or greater
authority in order for the operation to proceed.
AbleException
- On any remote error or Able error.javax.agent.service.naming.NamingException
- On any naming error.public int getState() throws com.ibm.able.AbleException
AblePlatformService
getState
in interface AblePlatformService
com.ibm.able.platform.AblePlatformService
AbleException
- On any remote error or Able error.public void registerJob(AbleEServerJobIfc job, AbleSecureKey key) throws AbleEServerJobException
AbleEServerJobService
registerJob
in interface AbleEServerJobService
com.ibm.able.platform.AbleEServerJobService
job
- The AbleEServerJobIfc job that is to be registered.
key
- AbleSecureKey to secure communication
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
.
public void deregisterJob(AbleEServerJobIfc job, AbleSecureKey key) throws AbleEServerJobException
AbleEServerJobService
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 reomoved.
Calls to this method may be delegated, but the VerifiableAgentName at every hop along the way must be authenticated and authorized.
deregisterJob
in interface AbleEServerJobService
com.ibm.able.platform.AbleEServerJobService
job
- The AbleEServerJobIfc job that is to be deregistered.
key
- AbleSecureKey to secure communication
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.
public AbleEServerJobIfc getJobInfo(java.lang.String theJobKey) throws AbleEServerJobException
theJobKey
.
getJobInfo
in interface AbleEServerJobService
theJobKey
- The job key of the AbleEServerJobIfc that is to be returned.
theJobKey
.
AbleEServerJobException
- public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String Copyright()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |