|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The AgentLoggingService interface defines the operations that can be requested of a Logging Service.
An Agent Logging Service is where agents and other entities of the platform can log AbleAgentSituationReports. These reports can be problems that agents encounter and they want help with. Other agents or users at the console can then view these logs and answer them.
Agents could also log their history to this service. Then users at the console can view the history of an agent.
Field Summary | |
static java.lang.String[] |
COLUMN_NAMES
The column names and types of the table that this service will persist to. |
static java.lang.String[] |
COLUMN_TYPES
|
static java.lang.String |
HISTORY_LOG_MAX
This string will represent the properties that the AgentLoggingService will expect to be defined in the AblePlatform.preferences file. |
static java.lang.String |
SERVICE_TYPE
The well-known service type. |
Method Summary | |
void |
answerAgentRequest(AbleAgentSituationReport answeredAbleAgentSituationReport,
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. |
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. |
void |
logAgentSituationReport(AbleAgentSituationReport asr,
AbleSecureKey key)
Log an AbleAgentSituationReport to the Logging Service, and notify all interested listeners about this added log. |
void |
removeAgentLogs(javax.agent.AgentName agentName,
AbleSecureKey key)
Removes all of the AbleAgentSituationReports that belong to a certain agent. |
void |
removeAgentSituationReports(java.util.Vector asrsToRemove,
AbleSecureKey key)
Removes AbleAgentSituationReports from the Logging Service, and notify all interested listeners about these removals. |
java.util.Vector |
search(AbleAgentSituationReport searchAsr)
Return a Vector of all of the AbleAgentSituationReports that match the criteria supplied in the passed in AbleAgentSituationReport. |
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 interface javax.agent.service.Service |
getServiceProperties, setServiceProperties |
Methods inherited from interface com.ibm.able.platform.AblePlatformService |
getState, terminateService |
Methods inherited from interface com.ibm.able.platform.AblePlatformServiceEventGenerator |
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener |
Field Detail |
public static final java.lang.String SERVICE_TYPE
public static final java.lang.String HISTORY_LOG_MAX
public static final java.lang.String[] COLUMN_NAMES
public static final java.lang.String[] COLUMN_TYPES
Method Detail |
public void logAgentSituationReport(AbleAgentSituationReport asr, AbleSecureKey key) throws AgentLoggingException
If secure, the log request will proceed as long as the caller is authenticated.
The logging of duplicate AbleAgentSituationReports will fail.
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
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.
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 asrsToRemove, AbleSecureKey key) throws AgentLoggingException
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.
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
AgentLoggingException
- on all remote errors.public java.util.Vector getAllProblems() throws AgentLoggingException
AgentLoggingException
- on all remote errors.public java.util.Vector getAgentHistory(javax.agent.AgentName agentName) throws AgentLoggingException
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
agentName
- The AgentName of the agent whose problem logs will be returned.
AgentLoggingException
- on all remote errors.public void answerAgentRequest(AbleAgentSituationReport answeredAbleAgentSituationReport, AbleSecureKey key) throws com.ibm.able.AbleException, AgentLoggingException
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
When secure, this method can only be called by the actaul agent that logged these logs. This method call cannot be delegated.
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 searchAsr) throws AgentLoggingException
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.
searchAsr
- The AbleAgentSituationReport which represents the criteria that will be searched for.
AgentLoggingException
- If the search AbleAgentSituationReport is null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |