|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.rmi.server.RemoteObject
org.jagent.service.util.RMIBasicService
com.ibm.able.platform.AbleBasicService
The base class of all ABLE-provided platform services, such as the VerifiableAgentDirectoryService, the VerifiableAgentNamingService, and the AgentLifeCycleService; this class is inserted between the JAS RMIBasicService and all ABLE-supplied services to provide common function to the ABLE-supplied services. To derived services this class provides:
RmiAblePlatformServiceEventGenerator interface.
Additionally, when security is on
(Able.Preferences.isSecure()==true), this class
provides:
This class is abstract because it does not implement the
getBindingName() method specified by RMIBasicService.
That method must be implemented by classes derived from this one.
| Field Summary | |
|---|---|
static java.lang.String |
ANS_PRINCIPAL
Service Properties passed to a service's factory when the service is started by AblePlatformSupport. |
static java.lang.String |
LOCAL_PRINCIPAL
|
protected java.lang.String |
myAnsPrincipal
The principal of the AgentNamingService. |
protected java.security.KeyPair |
myKeyPair
The Public and Private keys for this service. |
protected AbleLogger |
myMsgLog
A logger where informational, warning, and error messages can be routed. |
protected java.lang.String |
myPrincipal
The principal of this service. |
protected AbleSecuritySupport |
mySecSppt
A helper object to assist with security related matters. |
protected java.util.Vector |
myServiceEventListeners
Service event listeners that are registered with this service. |
protected javax.agent.service.ServiceProperties |
myServiceProperties
ServiceProperies passed to this service's contructor are cached here. |
protected AbleLogger |
myTrcLog
A logger where tracing information can be routed. |
protected java.lang.String |
myTrustLevel
The Trust Level contained in the VerifiableAgentName (VAN) for this service. |
protected VerifiableAgentName |
myVerifiableAgentName
The IBM Verifiable Agent Name (VAN) for this service. |
protected VerifiableAgentNamingService |
myVerifiableNamingService
The IBM VerifiableAgentNamingService for this service, set in the constructor. |
static int |
Refreshing
Service state: the service is running, but is in the process of refreshing its data from the persistence store. |
static java.lang.String |
REQUESTORS_PORT
|
static int |
Running
Service state: the service is active; it has been invoked. |
static java.lang.String |
SOCKET_FACTORY
|
static int |
Terminated
Service state: the service has been terminated. |
static int |
Unknown
Service state: the service is in an unknown state. |
| 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 | |
|---|---|
AbleBasicService()
Creates an instance of the basic service. |
|
AbleBasicService(javax.agent.service.ServiceProperties theServiceProperties)
Creates an instance of the basic service based on the specified service properties. |
|
| Method Summary | |
|---|---|
void |
addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
Adds a service event listener to this service. |
java.util.Vector |
getAblePlatformServiceEventListeners()
Gets a collection of all service event listeners registered with this service event generator. |
int |
getState()
Gets the current state of this service. |
protected void |
notifyAblePlatformServiceEventListeners(AblePlatformServiceEvent theEvent,
AblePersistenceSupport thePrstSppt,
java.lang.String theListenerColumnName)
Delivers the specified service event to all registered service event listeners; should any service event listener fail to receive the event, the listener is removed from the list and will receive no furhter events until it reregisters. |
void |
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
Removes a service event listener from this service. |
protected void |
setState(int theState)
Sets the state of this 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. |
protected void |
thenNotifyAblePlatformServiceEventListeners(java.lang.String theCallingMethod,
int theEventId,
java.lang.String theEventDescription,
java.lang.Object theEventObject1,
java.lang.Object theEventObject2,
AblePersistenceSupport thePrstSppt,
java.lang.String theListenerColumnName)
Packages the specified parameters into an AblePlatformServiceEvent and calls "notify" to deliver the event to all registered service event listeners. |
| Methods inherited from class org.jagent.service.util.RMIBasicService |
|---|
bindServiceToRegistry, getBindingName, 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 |
| Field Detail |
public static final java.lang.String ANS_PRINCIPAL
public static final java.lang.String LOCAL_PRINCIPAL
public static final java.lang.String REQUESTORS_PORT
public static final java.lang.String SOCKET_FACTORY
public static final int Unknown
public static final int Running
public static final int Refreshing
public static final int Terminated
protected final java.util.Vector myServiceEventListeners
addAblePlatformServiceEventListener(AblePlatformServiceEventListener),
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener),
notifyAblePlatformServiceEventListeners(AblePlatformServiceEvent,AblePersistenceSupport,String)protected java.security.KeyPair myKeyPair
Note that this field is always null unless platform security is on.
This field is set by the constructor.
protected VerifiableAgentName myVerifiableAgentName
Note that this field is always null unless platform security is on.
If security is on, this field is dependent on IBM's VerifiableAgentNamingService.
This field is set by the constructor.
protected java.lang.String myTrustLevel
protected VerifiableAgentNamingService myVerifiableNamingService
protected java.lang.String myPrincipal
myAnsPrincipalprotected java.lang.String myAnsPrincipal
myPrincipalprotected javax.agent.service.ServiceProperties myServiceProperties
protected AbleSecuritySupport mySecSppt
This object is null unless security is on.
When security is on, this object is created by the constructor for all derived services except for the RMIVerifiableNamingService, which, because it is responsible for obtaining its own VAN, must set this field itself.
After construction, this field is used as a helper object to generate and verify secure keys and check trust levels.
protected AbleLogger myMsgLog
Able.MessageLog.
protected AbleLogger myTrcLog
Able.TraceLog.
| Constructor Detail |
public AbleBasicService()
throws java.lang.Exception
public AbleBasicService(javax.agent.service.ServiceProperties theServiceProperties)
throws java.lang.Exception
theServiceProperties - Service properties on which the service is based.
LOCAL_PRINCIPAL,
ANS_PRINCIPAL, and
RMIService.SERVICE_PORT are a few of the
properties examined.
| Method Detail |
public void terminateService(AbleSecureKey theSecureKey)
throws AbleException,
javax.agent.service.naming.NamingException
RmiAblePlatformService
terminateService in interface RmiAblePlatformServicetheSecureKey - 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
javax.agent.service.naming.NamingException
public int getState()
throws AbleException
The states of Services derived from AbleBasicService are as follows:
Services should not be used while they are Refreshing. Data returned from any such calls during this time should not be trusted.
getState in interface RmiAblePlatformServiceAbleException - On any RMI error.Running,
Refreshing,
Terminated,
Unknown
public void addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
throws AbleException
RmiAblePlatformServiceEventGenerator
addAblePlatformServiceEventListener in interface RmiAblePlatformServiceEventGeneratortheListener - Any object interested in listening for service events
generated by this service.
AbleException
public void removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
throws AbleException
RmiAblePlatformServiceEventGenerator
removeAblePlatformServiceEventListener in interface RmiAblePlatformServiceEventGeneratortheListener - A previously registered object that is no longer
interested in listening for service events generated
by this service.
AbleException
public java.util.Vector getAblePlatformServiceEventListeners()
throws AbleException
RmiAblePlatformServiceEventGenerator
getAblePlatformServiceEventListeners in interface RmiAblePlatformServiceEventGeneratorAbleException
protected void thenNotifyAblePlatformServiceEventListeners(java.lang.String theCallingMethod,
int theEventId,
java.lang.String theEventDescription,
java.lang.Object theEventObject1,
java.lang.Object theEventObject2,
AblePersistenceSupport thePrstSppt,
java.lang.String theListenerColumnName)
theCallingMethod - The name of the method generating the service event;
for example, "createAgentInstance".
theEventId - A service event ID as defined in
AblePlatformServiceEvent
theEventDescription - An NLS message describing the event.
theEventObject1 - An arbitrary object that is solely dependent on the
service generating the event.
For property-change types of events, this parameter
typically contains the "old" property value.
theEventObject2 - An arbitrary object that is solely dependent on the
service generating the event.
For property-change types of events, this parameter
typically contains the "new" property value.
thePrstSppt - The AblePersistenceSupport object from which failing
listeners should be removed. If persistence is off,
this must be null.
theListenerColumnName - The name of the listener column in thePrstSppt.
notifyAblePlatformServiceEventListeners(AblePlatformServiceEvent,AblePersistenceSupport,String),
addAblePlatformServiceEventListener(AblePlatformServiceEventListener),
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener),
AblePlatformServiceEvent
protected void notifyAblePlatformServiceEventListeners(AblePlatformServiceEvent theEvent,
AblePersistenceSupport thePrstSppt,
java.lang.String theListenerColumnName)
throws javax.agent.service.ServiceException,
javax.agent.service.ServiceFailure
theEvent - The service event to be broadcast to all registered
service event listeners.
thePrstSppt - The AblePersistenceSupport object from which failing
listeners should be removed. If persistence is off,
this must be null.
theListenerColumnName - The name of the listener column in thePrstSppt.
javax.agent.service.ServiceException - On any service error.
javax.agent.service.ServiceFailure - On any service failure.thenNotifyAblePlatformServiceEventListeners(String,int,String,Object,Object,AblePersistenceSupport,String),
addAblePlatformServiceEventListener(AblePlatformServiceEventListener),
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener),
AblePlatformServiceEventprotected void setState(int theState)
theState - What the service's current state should be set to.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||