|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.platform.RmiAgentLoggingServiceProxy
The RMIAgentLoggingServiceProxy is a proxy for the RMI implementation of the AgentLoggingService.
An RMI Agent Logging Service proxy contains a reference to an RMI version of an Agent Logging 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:
Fields inherited from interface com.ibm.able.platform.AgentLoggingService |
COLUMN_NAMES, COLUMN_TYPES, HISTORY_LOG_MAX, SERVICE_TYPE |
Constructor Summary | |
RmiAgentLoggingServiceProxy(RmiAgentLoggingService theDelegate,
java.rmi.registry.Registry theRegistry,
java.lang.String theAddress)
Create a proxy over the specified RMI reference to an Agent Logging Service. |
Method Summary | |
void |
addAblePlatformServiceEventListener(AblePlatformServiceEventListener observer)
Adds a service event listener to this service. |
void |
answerAgentRequest(AbleAgentSituationReport asr,
AbleSecureKey key)
When someone is attempting to answer and existing problem AbleAgentSituationReport, this method will take the answered AbleAgentSituationReport and contact the one who originally logged the request. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
java.util.Vector |
getAblePlatformServiceEventListeners()
Gets a collection of all service event listeners registered with this service event generator. |
java.util.Vector |
getAgentHistory(javax.agent.AgentName agentName)
Returns all of the AbleAgentSituationReports from the Logging Service that belong to a certain agent that are not in the problem state. |
java.util.Vector |
getAgentProblems(javax.agent.AgentName agentName)
Returns all of the AbleAgentSituationReports from the Logging Service that belong to a certain agent that are in the problem state. |
java.util.Vector |
getAllLogs()
Return a Vector of all the AbleAgentSituationReports from the Logging Service. |
java.util.Vector |
getAllProblems()
Returns all of the AbleAgentSituationReports from the Logging Service that are in the problem state. |
javax.agent.service.ServiceProperties |
getServiceProperties()
Retrieve the service properties of the underlying service. |
int |
getState()
Returns the state of this service. |
void |
logAgentSituationReport(AbleAgentSituationReport asr,
AbleSecureKey key)
Log an AbleAgentSituationReport to the Logging Service, and notify all interested listeners about this added log. |
void |
removeAblePlatformServiceEventListener(AblePlatformServiceEventListener observer)
Removes a service event listener from this service. |
void |
removeAgentLogs(javax.agent.AgentName agentName,
AbleSecureKey key)
Removes all of the AbleAgentSituationReports that belong to a certain agent. |
void |
removeAgentSituationReports(java.util.Vector asrs,
AbleSecureKey key)
Removes AbleAgentSituationReports from the Logging Service, and notify all interested listeners about these removals. |
java.util.Vector |
search(AbleAgentSituationReport asr)
Return a Vector of all of the AbleAgentSituationReports that match the criteria supplied in the passed in AbleAgentSituationReport. |
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. |
void |
updateAgentSituationReport(AbleAgentSituationReport old,
AbleAgentSituationReport replacement,
AbleSecureKey key)
Update an AbleAgentSituationReport in the Logging Service, and notify all interested listeners about this update. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RmiAgentLoggingServiceProxy(RmiAgentLoggingService theDelegate, java.rmi.registry.Registry theRegistry, java.lang.String theAddress)
theDelegate
- A reference to an RMI version of an Agent Logging
Service.
theRegistry
- The RMI registry at which the above Agent Logging
Service is registered.
theAddress
- The RMI address at which the above Agent Logging
Service is registered.
Method Detail |
public void addAblePlatformServiceEventListener(AblePlatformServiceEventListener observer) 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 observer) 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 logAgentSituationReport(AbleAgentSituationReport asr, AbleSecureKey key) throws AgentLoggingException
AgentLoggingService
If secure, the log request will proceed as long as the caller is authenticated.
The logging of duplicate AbleAgentSituationReports will fail.
logAgentSituationReport
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
theAbleAgentSituationReport
- The AbleAgentSituationReport that is to be logged.
key
- The AbleSecureKey that secures communication.
AgentLoggingException
- If the AbleAgentSituationReport to be logged is null.
If the caller is not authenticated.
If a duplicate AbleAgentSituationReport is already logged.
public void updateAgentSituationReport(AbleAgentSituationReport old, AbleAgentSituationReport replacement, AbleSecureKey key) throws AgentLoggingException
AgentLoggingService
An AbleAgentSituationReport can only be updated if it is in the problem state. History logs may never be changed.
When secure, an AbleAgentSituationReport in the problem state can only be updated by its own VerifiableAgentName.
This method call cannot be delegated. The VerifiableAgentName of the AbleAgentSituationReport that is to be updated must directly make the call.
updateAgentSituationReport
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
oldLog
- The AbleAgentSituationReport that is to be updated.
updatedLog
- The AbleAgentSituationReport that is to replace the old AbleAgentSituationReport.
key
- The AbleSecureKey that secures communication.
AgentLoggingException
- If the updated AbleAgentSituationReport is null.
If the caller is not authenticated.
If the log to be updated does not exist.
If the log being updated to already exists.
If the log we are updating is a history log.
If the caller is not the one who originally logged the log being updated.
public void removeAgentSituationReports(java.util.Vector asrs, AbleSecureKey key) throws AgentLoggingException
AgentLoggingService
When secure and the AbleAgentSituationReport is verifiable, an AbleAgentSituationReport in the problem state can only be removed by it own VerifiableAgentName, so this method call cannot be delegated in this case.
An AbleAgentSituationReport in the history state can be removed by anyone with equal or greater authority to the VerifiableAgentName of the AbleAgentSituationReport. This call can be delegated in this case.
removeAgentSituationReports
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
asrsToRemove
- A Vector of all the AbleAgentSituationReports that should be removed.
key
- The AbleSecureKey that secures communication.
AgentLoggingException
- If the remove Vector is null.
If an AbleAgentSituationReport that is to be removed does not exist.
If the caller is not authenticated.
If attempting to remove a problem log, and the caller is not the one who originally logged it.
If attempting to remove a history log, and the caller does not have equal to or greater authority as the one who originally logged it.
public java.util.Vector getAllLogs() throws AgentLoggingException
AgentLoggingService
getAllLogs
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
AgentLoggingException
- on all remote errors.public java.util.Vector getAllProblems() throws AgentLoggingException
AgentLoggingService
getAllProblems
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
AgentLoggingException
- on all remote errors.public java.util.Vector getAgentHistory(javax.agent.AgentName agentName) throws AgentLoggingException
AgentLoggingService
getAgentHistory
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
agentName
- The AgentName of the agent whose history logs will be returned.
AgentLoggingException
- on all remote errors.public java.util.Vector getAgentProblems(javax.agent.AgentName agentName) throws AgentLoggingException
AgentLoggingService
getAgentProblems
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
agentName
- The AgentName of the agent whose problem logs will be returned.
AgentLoggingException
- on all remote errors.public void answerAgentRequest(AbleAgentSituationReport asr, AbleSecureKey key) throws com.ibm.able.AbleException, AgentLoggingException
AgentLoggingService
answerAgentRequest
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
answeredAbleAgentSituationReport
- The answered problem AbleAgentSituationReport.
key
- The key that is used to secure this communication
AgentLoggingException
- If the answered AbleAgentSituationReport is null.
If the caller is not authenticated.
If the AbleAgentSituationReport that is being answered does not exist.
If unable to locate the agent who originally logged the request.
If using a History log to answer a request.
On any remote error calling the agent.
AbleException
- On errors coming back from the agent.public void removeAgentLogs(javax.agent.AgentName agentName, AbleSecureKey key) throws AgentLoggingException
AgentLoggingService
When secure, this method can only be called by the actaul agent that logged these logs. This method call cannot be delegated.
removeAgentLogs
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
agentName
- The AgentName of the agent that is to have all of it's AbleAgentSituationReports removed.
key
- The key that is used to secure this communication.
AgentLoggingException
- If the agentName
parameter is null.
If the caller is not authenticated.
public java.util.Vector search(AbleAgentSituationReport asr) throws AgentLoggingException
AgentLoggingService
If fields in the AbleAgentSituationReport are left as null, a match can contain anything in this field. There is no way to wildcard the search for the state and timeSent fields since they are primitive types.
search
in interface AgentLoggingService
com.ibm.able.platform.AgentLoggingService
searchAsr
- The AbleAgentSituationReport which represents the criteria that will be searched for.
AgentLoggingException
- If the search AbleAgentSituationReport is null.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |