|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.platform.AbleEServerSituation
The AbleEServerSituation class defines the situation of a capabilty of an AbleEServerAgent.
A capability of an agent defines a role or behavior that the agent will take on. An example might be a "DASD Monitor" capability. An AbleEServerSituation defines the situation that the capability it belongs to might encounter. An example of an AbleEServerSituation of a "DASD Monitor" AbleEServerCapability might be "DASD is too high". This situation would hold the severity and type of the situation, and also all of the possible answers that the agent might take for this situation.
The yesResponse
is the response that will be taken if the automation level
of the capability this situation belongs to is set to YES.
The noResponse
is the response that will be taken if the automation level
of the capabiltiy this situation belongs to is set ot NO.
If the autonomy level of the capability this situation belongs to is set to ASK,
then the will create an AbleAgentSituationReport
filled with all possible
responses.
Field Summary | |
static com.ibm.able.AbleMessageContainer |
FAILURE_REQUEST
|
static int |
HIGH_SEVERITY
|
static com.ibm.able.AbleMessageContainer |
HIGH_SEVERITY_STRING
|
static com.ibm.able.AbleMessageContainer |
INFO_SITUATION
|
static int |
LOW_SEVERITY
These three are the possible severity levels for a situation |
static com.ibm.able.AbleMessageContainer |
LOW_SEVERITY_STRING
Grab the NLS strings for the severity levels |
static int |
MEDIUM_SEVERITY
|
static com.ibm.able.AbleMessageContainer |
MEDIUM_SEVERITY_STRING
|
static com.ibm.able.AbleMessageContainer |
PERMISSION_REQUEST
These three are the possible types of requests for a situation |
Constructor Summary | |
AbleEServerSituation(AbleEServerSituation theAbleEServerSituation)
Creates an AbleEServerSituation based off another AbleEServerSituation. |
|
AbleEServerSituation(java.io.Serializable theSituationIdentifier,
com.ibm.able.AbleMessageContainer theSituationName,
int theSeverityLevel,
com.ibm.able.AbleMessageContainer theSituationType,
com.ibm.able.AbleMessageContainer[] theResponses)
Create an AbleEServerSituation |
Method Summary | |
static java.lang.String |
Copyright()
Gets the copyright of this class. |
java.lang.String |
debugString()
Returns a translated representation of this AbleEServerSituation. |
boolean |
equals(java.lang.Object o)
Compares this AbleEServerSituation with another to determine if the situations are equal. |
void |
formatResponse(int responseIndex,
java.lang.Object[] subText)
Format a response with the supplied substitution text. |
void |
formatSituationName(java.lang.Object[] subText)
Format the situation name with the supplied substitution text. |
com.ibm.able.AbleMessageContainer |
getName()
Method getName |
com.ibm.able.AbleMessageContainer |
getNoResponse()
Method getNoResponse |
com.ibm.able.AbleMessageContainer |
getResponse(int responseIndex)
Method getReponse |
com.ibm.able.AbleMessageContainer[] |
getResponses()
Method getResponses |
int |
getSeverityLevel()
Method getSeverityLevel |
com.ibm.able.AbleMessageContainer |
getSeverityLevelString()
Method getSeverityLevelString |
java.io.Serializable |
getSituationIdentifier()
Method getSituationIdentifier |
com.ibm.able.AbleMessageContainer |
getSituationType()
Method getSituationType |
com.ibm.able.AbleMessageContainer |
getYesResponse()
Method getYesResponse |
int |
hashCode()
Return the hashCode for an AbleEServerSituation |
java.lang.String |
toString()
Returns a brief description of this AbleEServerSituation. |
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 com.ibm.able.AbleMessageContainer LOW_SEVERITY_STRING
public static final com.ibm.able.AbleMessageContainer MEDIUM_SEVERITY_STRING
public static final com.ibm.able.AbleMessageContainer HIGH_SEVERITY_STRING
public static final com.ibm.able.AbleMessageContainer PERMISSION_REQUEST
public static final com.ibm.able.AbleMessageContainer FAILURE_REQUEST
public static final com.ibm.able.AbleMessageContainer INFO_SITUATION
Constructor Detail |
public AbleEServerSituation(java.io.Serializable theSituationIdentifier, com.ibm.able.AbleMessageContainer theSituationName, int theSeverityLevel, com.ibm.able.AbleMessageContainer theSituationType, com.ibm.able.AbleMessageContainer[] theResponses)
An AbleEServerSituation is used to define a situation that an agent may get in. This situaiton will belong to a certain capabiltiy of the agent.
Everything but the yesResponse
and noResponse
will be set on the constructor. The yesResponse
will default
to the first response in theResponses
and the noResponse
with default to the last.
theSituationIdentifier
- The identifier of this situation.
theSituationName
- The name of this situation.
theSeverityLevel
- The severity level of this situation.
theSituationType
- The type of this situation.
theResponses
- All of the responses for this situation.public AbleEServerSituation(AbleEServerSituation theAbleEServerSituation)
An AbleEServerSituation is used to define a situation that an agent may get in. This situaiton will belong to a certain capabiltiy of the agent. This constructor should be used as a copy constructor.
theAbleEServerSituation
- The AbleEServerSituation
to create a new AbleEServerSituation based off of.Method Detail |
public void formatSituationName(java.lang.Object[] subText)
subText
- The substitution text to format the situation name.public void formatResponse(int responseIndex, java.lang.Object[] subText)
responseIndex
- The index of the response string that is to be formatted.
subText
- The substitution text to format the response at responseIndex
.public java.io.Serializable getSituationIdentifier()
public com.ibm.able.AbleMessageContainer[] getResponses()
public com.ibm.able.AbleMessageContainer getResponse(int responseIndex)
responseIndex
- The index of the response that is to be returned.
responseIndex
.public com.ibm.able.AbleMessageContainer getName()
public int getSeverityLevel()
public com.ibm.able.AbleMessageContainer getSeverityLevelString()
public com.ibm.able.AbleMessageContainer getSituationType()
public com.ibm.able.AbleMessageContainer getNoResponse()
public com.ibm.able.AbleMessageContainer getYesResponse()
public java.lang.String debugString()
public static java.lang.String Copyright()
public boolean equals(java.lang.Object o)
AbleEServerSituation are equal if their internal, private, immutable handles are equal.
equals
in class java.lang.Object
o
- An instance of an AbleEServerSituation that is to
be compared to this AbleEServerSituation.
AbleEServerSituations are equal if their internal, private, immutable handles are equal.
public int hashCode()
The hashCode of an AbleEServerSituation is the sum of the hashCodes of all of the the internal, private, immutable handles of this Object.
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |