Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

## com.ibm.able.platform
Class RmiAgentLoggingSystem

    java.lang.Object
      java.rmi.server.RemoteObject
          org.jagent.service.util.RMIBasicService
              com.ibm.able.platform.AbleBasicService
                  com.ibm.able.platform.RmiAgentLoggingSystem

All Implemented Interfaces:
  AblePersistenceSupportProcessor, org.jagent.service.IPService, java.rmi.Remote, RmiAblePlatformService, RmiAblePlatformServiceEventGenerator, RmiAgentLoggingService, org.jagent.service.RMIService, java.io.Serializable, javax.agent.service.Service

public final class RmiAgentLoggingSystem
extends AbleBasicService
implements RmiAgentLoggingService, AblePersistenceSupportProcessor

This is the implementation of an RMI-based Agent Logging Service.

This keeps track of all of the the AbleAgentSituationReports of a platform. Any part of the platform could log/update/delete/search AbleAgentSituationReports with this Service. Parts of the platform will also come here to find logs:

- All logs
- Problem logs for a certain agent
- History logs for a certain agent
- All problem logs
- All history logs

The logging service does more than just store logs. When someone might want to answer a problem of an agent, this service can be used to delegate this answer back to the originator of the problem request. It will be entirely up to the originator of the problem request to authorize the answer when secure. If secure, the service will authenticate the caller, but go no further.

See Also:
  Serialized Form

Field Summary

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
`RmiAgentLoggingSystem()` Create an instance of an RMI-based Agent Logging Service.
`RmiAgentLoggingSystem(javax.agent.service.ServiceProperties theServiceProperties)` Create an instance of an RMI-based Agent Logging Service with the given service properties.

Method Summary
`void` | `addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)` Since this Logging Service will be persisting listeners, AbleBasicService's `addAblePlatformServiceEventListener` method must be overridden to handle the adding of this service's listeners from persistence.
`void` | `answerAgentRequest(AbleAgentSituationReport asr, AbleSecureKey key)` When someone is attempting to answer and existing problem AgentSituationReport, this method will take the answered AgentSituationReport and contact the one who originally logged the request.
`java.util.Vector` | `getAgentHistory(javax.agent.AgentName agentName)` Returns all of the AgentSituationReports 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 AgentSituationReports 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 AgentSituationReports from the Logging Service that are in the problem state.
`java.lang.String` | `getBindingName()` Abstract method from org.jagent.service.util.RMIBasicService.
`void` | `logAgentSituationReport(AbleAgentSituationReport theAbleAgentSituationReport, AbleSecureKey key)` Log an AbleAgentSituationReport to the Logging Service, and notify all interested listeners about this added log.
`void` | `refreshLocalFromPersistence(AblePersistenceSupport thePersistenceSupport, java.lang.Object[] persistedRecords)` Takes the persisted Objects that are read in, and sets them locally.
`void` | `removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)` Since this Verifiable Directory Service will be persisting listeners, AbleBasicService's `removeAblePlatformServiceEventListener` method must be overridden to handle the removing of this service's listeners from persistence.
`void` | `removeAgentLogs(javax.agent.AgentName agentName, AbleSecureKey key)` Removes all of the AgentSituationReports that belong to a certain agent.
`void` | `removeAgentSituationReports(java.util.Vector asrsToRemove, AbleSecureKey key)` Removes AgentSituationReports 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 AgentSituationReports that match the criteria supplied in the passed in AgentSituationReport.
`void` | `terminateService(AbleSecureKey key)` When this service is terminated, there will be Logging Service specific cleanup that needs to be done.
`void` | `updateAgentSituationReport(AbleAgentSituationReport oldLog, AbleAgentSituationReport updatedLog, AbleSecureKey key)` Update an AgentSituationReport in the Logging Service, and notify all interested listeners about this update.

Methods inherited from class com.ibm.able.platform.AbleBasicService
`getAblePlatformServiceEventListeners, getState, notifyAblePlatformServiceEventListeners, 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
`getAblePlatformServiceEventListeners`

Constructor Detail

### RmiAgentLoggingSystem

    public RmiAgentLoggingSystem()
                          throws java.lang.Exception

  Create an instance of an RMI-based Agent Logging Service.

Throws:
  `java.lang.Exception` -

  On all errors calling the constructor of the super class.

  On errors setting up the persistence support in `ctorHelper`.

  On errors binding this service.

### RmiAgentLoggingSystem

    public RmiAgentLoggingSystem(javax.agent.service.ServiceProperties theServiceProperties)
                          throws java.lang.Exception

  Create an instance of an RMI-based Agent Logging Service with the given service properties.

Parameters:
  `theServiceProperties` - The properties that will help define this Service.
Throws:
  `java.lang.Exception` -

  On all errors calling the constructor of the super class.

  On errors setting up the persistence support in `ctorHelper`.

  On errors binding this service.

Method Detail

### getBindingName

    public java.lang.String getBindingName()

  Abstract method from org.jagent.service.util.RMIBasicService.

  Returns:
    String the binding name for this remote object

### addAblePlatformServiceEventListener

    public void addAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
                                             throws AbleException

  Since this Logging Service will be persisting listeners, AbleBasicService's `addAblePlatformServiceEventListener` method must be overridden to handle the adding of this service's listeners from persistence.

  Specified by:
    `addAblePlatformServiceEventListener` in interface `RmiAblePlatformServiceEventGenerator`
  Overrides:
    `addAblePlatformServiceEventListener` in class `AbleBasicService`
  Throws:
    `AbleException` - On any error adding the listener.

### removeAblePlatformServiceEventListener

    public void removeAblePlatformServiceEventListener(AblePlatformServiceEventListener theListener)
                                                throws AbleException

  Since this Verifiable Directory Service will be persisting listeners, AbleBasicService's `removeAblePlatformServiceEventListener` method must be overridden to handle the removing of this service's listeners from persistence.

  Specified by:
    `removeAblePlatformServiceEventListener` in interface `RmiAblePlatformServiceEventGenerator`
  Overrides:
    `removeAblePlatformServiceEventListener` in class `AbleBasicService`
  Throws:
    `AbleException` - On any error adding the listener.

### terminateService

    public void terminateService(AbleSecureKey key)
                          throws AbleException,
                                 javax.agent.service.naming.NamingException

  When this service is terminated, there will be Logging Service specific cleanup that needs to be done. `AbleBasicService's` terminateService method has been overridden to take care of this cleanup.

  Since this service is persisting information, it's persistence support Object will do some cleanup when being terminated.

  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 was not authorized to make this call.

    `javax.agent.service.naming.NamingException` - On all naming errors.

### 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`
  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.

### logAgentSituationReport

    public void logAgentSituationReport(AbleAgentSituationReport theAbleAgentSituationReport,
                                        AbleSecureKey key)
                                 throws java.rmi.RemoteException,
                                        AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  Log an AbleAgentSituationReport to the Logging Service, and notify all interested listeners about this added log.

  If secure, the log request will proceed as long as the caller is authenticated.

  The logging of duplicate AbleAgentSituationReports will fail.

  Specified by:
    `logAgentSituationReport` in interface `RmiAgentLoggingService`
  Parameters:
    `theAbleAgentSituationReport` - The AgentSituationReport that is to be logged.
    `key` - The AbleSecureKey that secures communication.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.
    `AgentLoggingException` -

    If the AbleAgentSituationReport to be logged is null.

    If the caller is not authenticated.

    If a duplicate AbleAgentSituationReport is already logged.

### updateAgentSituationReport

    public void updateAgentSituationReport(AbleAgentSituationReport oldLog,
                                           AbleAgentSituationReport updatedLog,
                                           AbleSecureKey key)
                                    throws java.rmi.RemoteException,
                                           AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  Update an AgentSituationReport in the Logging Service, and notify all interested listeners about this update.

  An AgentSituationReport can only be updated if it is in the problem state. History logs may never be changed.

  When secure, an AgentSituationReport in the problem state can only be updated by its own VerifiableAgentName.

  This method call cannot be delegated. The VerifiableAgentName of the AgentSituationReport that is to be updated must directly make the call.

  Specified by:
    `updateAgentSituationReport` in interface `RmiAgentLoggingService`
  Parameters:
    `oldLog` - The AgentSituationReport that is to be updated.
    `updatedLog` - The AgentSituationReport that is to replace the old AgentSituationReport.
    `key` - The AbleSecureKey that secures communication.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.
    `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.

### removeAgentSituationReports

    public void removeAgentSituationReports(java.util.Vector asrsToRemove,
                                            AbleSecureKey key)
                                     throws java.rmi.RemoteException,
                                            AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  Removes AgentSituationReports from the Logging Service, and notify all interested listeners about these removals.

  When secure and the AgentSituationReport is verifiable, an AgentSituationReport in the problem state can only be removed by it own VerifiableAgentName, so this method call cannot be delegated in this case.

  An AgentSituationReport in the history state can be removed by anyone with equal or greater authority to the VerifiableAgentName of the AgentSituationReport. This call can be delegated in this case.

  Specified by:
    `removeAgentSituationReports` in interface `RmiAgentLoggingService`
  Parameters:
    `asrsToRemove` - A Vector of all the AbleAgentSituationReports that should be removed.
    `key` - The AbleSecureKey that secures communication.
  Throws:
    `AgentLoggingException` -

    If the remove Vector is null.

    If an AgentSituationReport 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.

    `java.rmi.RemoteException` - On all remote error.

### getAllLogs

    public java.util.Vector getAllLogs()
                                throws java.rmi.RemoteException

  Description copied from interface: `RmiAgentLoggingService`
  Return a Vector of all the AbleAgentSituationReports from the Logging Service.

  Specified by:
    `getAllLogs` in interface `RmiAgentLoggingService`
  Returns:
    Vector of all AbleAgentSituationReports logged to this service.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.

### getAllProblems

    public java.util.Vector getAllProblems()
                                    throws java.rmi.RemoteException

  Description copied from interface: `RmiAgentLoggingService`
  Returns all of the AgentSituationReports from the Logging Service that are in the problem state.

  Specified by:
    `getAllProblems` in interface `RmiAgentLoggingService`
  Returns:
    Vector of all the problem state AbleAgentSituationReports.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.

### getAgentHistory

    public java.util.Vector getAgentHistory(javax.agent.AgentName agentName)
                                     throws java.rmi.RemoteException

  Description copied from interface: `RmiAgentLoggingService`
  Returns all of the AgentSituationReports from the Logging Service that belong to a certain agent that are not in the problem state.

  Specified by:
    `getAgentHistory` in interface `RmiAgentLoggingService`
  Parameters:
    `agentName` - The AgentName of the agent whose history logs will be returned.
  Returns:
    Vector of all the history AbleAgentSituationReports for the supplied agent.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.

### getAgentProblems

    public java.util.Vector getAgentProblems(javax.agent.AgentName agentName)
                                      throws java.rmi.RemoteException

  Description copied from interface: `RmiAgentLoggingService`
  Returns all of the AgentSituationReports from the Logging Service that belong to a certain agent that are in the problem state.

  Specified by:
    `getAgentProblems` in interface `RmiAgentLoggingService`
  Parameters:
    `agentName` - The AgentName of the agent whose problem logs will be returned.
  Returns:
    Vector of all the problem AbleAgentSituationReports of the supplied agent.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.

### answerAgentRequest

    public void answerAgentRequest(AbleAgentSituationReport asr,
                                   AbleSecureKey key)
                            throws AbleException,
                                   java.rmi.RemoteException,
                                   AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  When someone is attempting to answer and existing problem AgentSituationReport, this method will take the answered AgentSituationReport and contact the one who originally logged the request.

  Specified by:
    `answerAgentRequest` in interface `RmiAgentLoggingService`
  Parameters:
    `asr` - The answered problem AgentSituationReport.
    `key` - The key that is used to secure this communication.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.
    `AbleException` - On errors coming back from the agent.
    `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.

### removeAgentLogs

    public void removeAgentLogs(javax.agent.AgentName agentName,
                                AbleSecureKey key)
                         throws java.rmi.RemoteException,
                                AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  Removes all of the AgentSituationReports that belong to a certain agent.

  When secure, this method can only be called by the actaul agent that logged these logs. This method call cannot be delegated.

  Specified by:
    `removeAgentLogs` in interface `RmiAgentLoggingService`
  Parameters:
    `agentName` - The AgentName of the agent that is to have all of it's AgentSituationReports removed.
    `key` - The key that is used to secure this communication.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.
    `AgentLoggingException` -

    If the `agentName` parameter is null.

    If the caller is not authenticated.

### search

    public java.util.Vector search(AbleAgentSituationReport asr)
                            throws java.rmi.RemoteException,
                                   AgentLoggingException

  Description copied from interface: `RmiAgentLoggingService`
  Return a Vector of all of the AgentSituationReports that match the criteria supplied in the passed in AgentSituationReport.

  If fields in the AgentSituationReport are left as null, a match can contain anything in this field. Since timeSent is a primitive type and cannot be set to null, set it to zero to wildcard that field. There is no way to wildcard the search for the state.

  Specified by:
    `search` in interface `RmiAgentLoggingService`
  Parameters:
    `asr` - The AgentSituationReport which represents the criteria that will be searched for.
  Returns:
    Vector of all the logs that match the supplied AgentSituationReport.
  Throws:
    `java.rmi.RemoteException` - On all remote errors.
    `AgentLoggingException` - If the search AgentSituationReport is null.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

(C) Copyright IBM Corporation 1999, 2005