|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.platform.RMIVerifiableDirectoryProxy
An RMIVerifiableDirectoryProxy contains a reference to an RMI version of a VerifiableDirectoryService. 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 DirectoryFailure Exceptions 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 the common VerifiableAgentDirectoryService interface.
Fields inherited from interface com.ibm.able.platform.VerifiableAgentDirectoryService |
---|
DIRECTORY_SERVICE_COLUMN_NAMES, DIRECTORY_SERVICE_COLUMN_TYPES, PUBLIC_KEY, SERVICE_PATH, SERVICE_TYPE |
Constructor Summary | |
---|---|
RMIVerifiableDirectoryProxy(RMIVerifiableDirectoryService theDelegate,
java.rmi.registry.Registry theRegistry,
java.lang.String theAddress)
Create a proxy over the specified RMI reference to a Verifiable Directory Service. |
Method Summary | |
---|---|
void |
addAblePlatformServiceEventListener(AblePlatformServiceEventListener observer)
Adds a service event listener to this service. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
javax.agent.service.directory.AgentDescription |
createAgentDescription()
|
void |
deregister(javax.agent.service.directory.AgentDescription desc)
|
void |
deregister(javax.agent.service.directory.AgentDescription desc,
AbleSecureKey key)
Deregister theAgentDescription from the VerifiableAgentDirectoryService. |
java.util.Vector |
getAblePlatformServiceEventListeners()
Gets a collection of all service event listeners registered with this service event generator. |
javax.agent.service.ServiceProperties |
getServiceProperties()
Retrieve the service properties of the underlying service. |
void |
modify(javax.agent.service.directory.AgentDescription desc)
|
void |
modify(javax.agent.service.directory.AgentDescription desc,
AbleSecureKey key)
Modify theAgentDescription in the VerifiableAgentDirectoryService. |
void |
register(javax.agent.service.directory.AgentDescription desc)
|
void |
register(javax.agent.service.directory.AgentDescription desc,
AbleSecureKey key)
Register theAgentDescription to the VerifiableAgentDirectoryService. |
void |
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener observer)
Removes a service event listener from this service. |
javax.agent.service.directory.AgentDescription[] |
search(javax.agent.service.directory.AgentDescription desc)
|
javax.agent.service.directory.AgentDescription[] |
search(javax.agent.service.directory.AgentDescription desc,
int maxResults)
|
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()
Retrieve a string describing (the contents of) the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RMIVerifiableDirectoryProxy(RMIVerifiableDirectoryService theDelegate, java.rmi.registry.Registry theRegistry, java.lang.String theAddress)
theDelegate
- A reference to an RMI version of a Verifiable Directory
Service.
theRegistry
- The RMI registry at which the above Verifiable Directory
Service is registered.
theAddress
- The RMI address at which the above Verifiable Directory
Service is registered.
Method Detail |
public void register(javax.agent.service.directory.AgentDescription desc, AbleSecureKey key) throws javax.agent.service.directory.AlreadyRegisteredException, javax.agent.service.directory.DirectoryFailure
VerifiableAgentDirectoryService
theAgentDescription
to the VerifiableAgentDirectoryService.
This method should only be called when the RMIVerifiableDirectorySystem is running in a secure platform.
An agent is only allowed to register its own agent description.
If successfully registered, all registered listeners will be notified of this newly registered agent description.
register
in interface VerifiableAgentDirectoryService
com.ibm.able.platform.VerifiableAgentDirectoryService
theAgentDescription
- The agent description to be registered.
key
- The AbleSecureKey used to secure the communication.
javax.agent.service.directory.AlreadyRegisteredException
- If theAgentDescription
is already registered.
javax.agent.service.directory.DirectoryFailure
- If the platform is not running secure.
If the agent description that is to be registered does not belong to the agent trying to register it.
public void deregister(javax.agent.service.directory.AgentDescription desc, AbleSecureKey key) throws javax.agent.service.directory.NotRegisteredException, javax.agent.service.directory.DirectoryFailure
VerifiableAgentDirectoryService
theAgentDescription
from the VerifiableAgentDirectoryService.
This method should only be called when the RMIVerifiableDirectorySystem is running in a secure platform.
An agent is only allowed to deregister its own agent description.
If successfully deregistered, all registered listeners will be notified of this deregistered agent description.
deregister
in interface VerifiableAgentDirectoryService
com.ibm.able.platform.VerifiableAgentDirectoryService
theAgentDescription
- The agent description to be deregistered.
key
- The AbleSecureKey used to secure the communication.
javax.agent.service.directory.NotRegisteredException
- If theAgentDescription
is not currently registered.
javax.agent.service.directory.DirectoryFailure
- If the platform is not running secure.
If the agent description that is to be deregistered does not belong to the agent trying to deregister it.
public void modify(javax.agent.service.directory.AgentDescription desc, AbleSecureKey key) throws javax.agent.service.directory.NotRegisteredException, javax.agent.service.directory.DirectoryFailure
VerifiableAgentDirectoryService
theAgentDescription
in the VerifiableAgentDirectoryService.
This method should only be called when the RMIVerifiableDirectorySystem is running in a secure platform.
An agent is only allowed to modify its own agent description.
If successfully modified, all registered listeners will be notified of this changed agent description.
modify
in interface VerifiableAgentDirectoryService
com.ibm.able.platform.VerifiableAgentDirectoryService
theAgentDescription
- The agent description to be modified.
key
- The AbleSecureKey used to secure the communication.
javax.agent.service.directory.NotRegisteredException
- If theAgentDescription
is not currently registered.
javax.agent.service.directory.DirectoryFailure
- If the platform is not running secure.
If the agent description that is to be modified does not belong to the agent trying to modify it.
public void register(javax.agent.service.directory.AgentDescription desc) throws javax.agent.service.directory.AlreadyRegisteredException, javax.agent.service.directory.DirectoryFailure
register
in interface javax.agent.service.directory.AgentDirectoryService
public void deregister(javax.agent.service.directory.AgentDescription desc) throws javax.agent.service.directory.NotRegisteredException, javax.agent.service.directory.DirectoryFailure
deregister
in interface javax.agent.service.directory.AgentDirectoryService
public void modify(javax.agent.service.directory.AgentDescription desc) throws javax.agent.service.directory.NotRegisteredException, javax.agent.service.directory.DirectoryFailure
modify
in interface javax.agent.service.directory.AgentDirectoryService
public javax.agent.service.directory.AgentDescription[] search(javax.agent.service.directory.AgentDescription desc) throws javax.agent.service.directory.SearchException, javax.agent.service.directory.DirectoryFailure
search
in interface javax.agent.service.directory.AgentDirectoryService
public javax.agent.service.directory.AgentDescription[] search(javax.agent.service.directory.AgentDescription desc, int maxResults) throws javax.agent.service.directory.SearchException, javax.agent.service.directory.DirectoryFailure
search
in interface javax.agent.service.directory.AgentDirectoryService
public javax.agent.service.directory.AgentDescription createAgentDescription()
createAgentDescription
in interface javax.agent.service.directory.AgentDirectoryService
public void terminateService(AbleSecureKey theSecureKey) throws 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 void addAblePlatformServiceEventListener(AblePlatformServiceEventListener observer) throws 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
- On any error.public void removeAblePlatformServiceEventListener(AblePlatformServiceEventListener observer) throws 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
- On any error.public java.util.Vector getAblePlatformServiceEventListeners() throws AbleException
AblePlatformServiceEventGenerator
getAblePlatformServiceEventListeners
in interface AblePlatformServiceEventGenerator
com.ibm.able.platform.AblePlatformServiceEventGenerator
AbleException
- On any error.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 java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |