|
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.Objectcom.ibm.able.platform.AbleAgentSituation
The AbleAgentSituation class defines a situation that an AblePlatformDefaultAgent with an AgentCapability may encounter.
A capability of an agent defines a role or behavior that the agent can take on. An example of an AgentCapability might be "DASD Monitor". Each AgentCapability of an agent may encounter one or more situations, and these are defined by this class. An example of an AgentSituation for a "DASD Monitor" AgentCapability might be "DASD is thrashing". This AgentSituation object holds the severity and type of situation encountered, and also all of the possible responses that an agent might take when encountering this situation.
Each AgentCapability of an agent has an automation level, and the response an agent may take when encountering an AgentSituation is influenced by that automation level:
If the automation level of this situation's AgentCapability is
set to YES, the situation's yesResponse is the
response that is taken by a well behaved agent.
If the automation level of this situation's AgentCapability is
set to NO, the situation's noResponse is the
response that is taken by a well behaved agent.
If the autonomy level of this situation's AgentCapability is
set to ASK, then an AgentSituationReport is
created that is filled with all possible responses to the
situation. AgentSituationReports are sent to the
AgentLoggingService, where they may be responded to by another
agent or a human being.
| Field Summary | |
|---|---|
static AbleMessageContainer |
FAILURE_REQUEST
Situation request type: Failure |
static int |
HIGH_SEVERITY
Situation severity level: High |
static AbleMessageContainer |
HIGH_SEVERITY_STRING
|
static AbleMessageContainer |
INFO_SITUATION
Situation request type: Information |
static int |
LOW_SEVERITY
Situation severity level: Low |
static AbleMessageContainer |
LOW_SEVERITY_STRING
Grab the NLS strings for the severity levels |
static int |
MEDIUM_SEVERITY
Situation severity level: Medium |
static AbleMessageContainer |
MEDIUM_SEVERITY_STRING
|
static AbleMessageContainer |
PERMISSION_REQUEST
Situation request type: Ask permission |
| Constructor Summary | |
|---|---|
AbleAgentSituation(AbleAgentSituation theAgentSituation)
Creates an AgentSituation from another AgentSituation (copy constructor). |
|
AbleAgentSituation(java.io.Serializable theSituationIdentifier,
AbleMessageContainer theSituationName,
int theSeverityLevel,
AbleMessageContainer theSituationType,
AbleMessageContainer[] theResponses)
Creates an AgentSituation. |
|
| Method Summary | |
|---|---|
java.lang.String |
debugString()
Returns a translated representation of this AgentSituation. |
boolean |
equals(java.lang.Object theObject)
Compares this AgentSituation with another to determine if the situations are equal. |
void |
formatResponse(int theResponseIndex,
java.lang.Object[] theSubText)
Formats a response with the supplied substitution text. |
void |
formatSituationName(java.lang.Object[] theSubText)
Formats the situation name with the supplied substitution text. |
AbleMessageContainer |
getName()
Method getName |
AbleMessageContainer |
getNoResponse()
Method getNoResponse |
AbleMessageContainer |
getResponse(int responseIndex)
Method getReponse |
AbleMessageContainer[] |
getResponses()
Gets a reference to the list of responses. |
int |
getSeverityLevel()
Method getSeverityLevel |
AbleMessageContainer |
getSeverityLevelString()
Method getSeverityLevelString |
java.io.Serializable |
getSituationIdentifier()
Method getSituationIdentifier |
AbleMessageContainer |
getSituationType()
Method getSituationType |
AbleMessageContainer |
getYesResponse()
Method getYesResponse |
int |
hashCode()
Returns the hashCode of this AgentSituation. |
java.lang.String |
toString()
Returns a brief description of this AgentSituation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LOW_SEVERITY
public static final int MEDIUM_SEVERITY
public static final int HIGH_SEVERITY
public static final AbleMessageContainer LOW_SEVERITY_STRING
public static final AbleMessageContainer MEDIUM_SEVERITY_STRING
public static final AbleMessageContainer HIGH_SEVERITY_STRING
public static final AbleMessageContainer PERMISSION_REQUEST
public static final AbleMessageContainer FAILURE_REQUEST
public static final AbleMessageContainer INFO_SITUATION
| Constructor Detail |
public AbleAgentSituation(java.io.Serializable theSituationIdentifier,
AbleMessageContainer theSituationName,
int theSeverityLevel,
AbleMessageContainer theSituationType,
AbleMessageContainer[] theResponses)
An AgentSituation is used to define a situation that an agent may encounter. The situaiton belongs to a certain AgentCapabiltiy of the agent.
Everything but the yesResponse and the
noResponse is set by the constructor. The
yesResponse defaults to the first response in
theResponses list and the noResponse
defaults to the last entry.
theSituationIdentifier - The identifier of this situation.theSituationName - The name of this situation.theSeverityLevel - The severity level of this situation. Must be one of:
theSituationType - The type of this situation. Must be one of:
theResponses - All of the responses for this situation.public AbleAgentSituation(AbleAgentSituation theAgentSituation)
theAgentSituation - The AgentSituation from which this AgentSituation is
created.| Method Detail |
public java.io.Serializable getSituationIdentifier()
public AbleMessageContainer getName()
public int getSeverityLevel()
public AbleMessageContainer getSeverityLevelString()
public AbleMessageContainer getSituationType()
public AbleMessageContainer[] getResponses()
public AbleMessageContainer getResponse(int responseIndex)
responseIndex - The index of the response that is to be returned.
responseIndex.public AbleMessageContainer getYesResponse()
public AbleMessageContainer getNoResponse()
public void formatSituationName(java.lang.Object[] theSubText)
theSubText - The substitution text to format the situation name.
public void formatResponse(int theResponseIndex,
java.lang.Object[] theSubText)
theResponseIndex - The index of the response string that is to be
formatted.theSubText - The substitution text to format the response at
theResponseIndex.public java.lang.String debugString()
public boolean equals(java.lang.Object theObject)
AgentSituation are equal if their internal, private, immutable handles are equal.
theObject - An instance of an AgentSituation that is to
be compared to this AgentSituation.
AgentSituations are equal if their internal, private, immutable handles are equal.
public int hashCode()
The hashCode of an AgentSituation is the sum of the hashCodes of all of the the internal, private, immutable handles of this object.
public java.lang.String toString()
|
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 | |||||||||||