com.ibm.able.platform
Class AbleEServerCapability

java.lang.Object
  |
  +--com.ibm.able.platform.AbleEServerCapability
All Implemented Interfaces:
java.io.Serializable

public class AbleEServerCapability
extends java.lang.Object
implements java.io.Serializable

The AbleEServerCapability class defines 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. The agent might do many different things for this capability. It might continually monitor the DASD and other system properties and act on problem situations that it notices.

Each AbleEServerCapability will have some AbleEServerSituations that it will watch for. A situation of the "DASD Monitor" capability might be "DASD too high". The agent would know how to handle this situation, but would act in a way that the autonomy level of this capability would dictate.

The default actions of each autonomy level of a capability are as follows:

These only define the default behavior of each automation level. It is up to the agent to act however it wants to at each level.

The autonomy level of a capability will default to NO.

See Also:
Serialized Form

Field Summary
static int ASK_CAPABILITY
           
static int NO_CAPABILITY
           
static int YES_CAPABILITY
          These are the three possible autonomy levels of a capability
 
Constructor Summary
AbleEServerCapability(AbleEServerCapability theAbleEServerCapability)
          Creates an AbleEServerCapability based off another AbleEServerCapability.
AbleEServerCapability(java.io.Serializable theCapabilityIdentifier, com.ibm.able.AbleMessageContainer theCapabilityName, int theAutonomyLevel, java.util.HashMap theSituations)
          Create an AbleEServerCapability
 
Method Summary
static java.lang.String Copyright()
          Gets the copyright of this class.
 java.lang.String debugString()
          Returns a translated representation of this AbleEServerCapability.
 boolean equals(java.lang.Object o)
          Compares this AbleEServerCapability with another to determine if the situations are equal.
 int getAutonomyLevel()
          Method getAutonomyLevel
 java.io.Serializable getCapabilityIdentifier()
          Method getCapabilityIdentifier
 com.ibm.able.AbleMessageContainer getName()
          Method getName
 AbleEServerSituation getSituation(java.io.Serializable theSituationIdentifier)
          Method getSituation
 java.util.HashMap getSituations()
          Method getSituations
 int hashCode()
          Return the hashCode for an AbleEServerCapability
 void setAutonomyLevel(int theAutonomyLevel)
          Method setAutonomyLevel
 java.lang.String toString()
          Returns a brief description of this AbleEServerCapability.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

YES_CAPABILITY

public static final int YES_CAPABILITY
These are the three possible autonomy levels of a capability

NO_CAPABILITY

public static final int NO_CAPABILITY

ASK_CAPABILITY

public static final int ASK_CAPABILITY
Constructor Detail

AbleEServerCapability

public AbleEServerCapability(java.io.Serializable theCapabilityIdentifier,
                             com.ibm.able.AbleMessageContainer theCapabilityName,
                             int theAutonomyLevel,
                             java.util.HashMap theSituations)
Create an AbleEServerCapability

An AbleEServerCapability class defines a capabilty of an AbleEServerAgent. A capability of an agent defines a role or behavior that the agent will take on.

Parameters:
theCapabilityIdentifier - An identifier for this capability.

theCapabilityName - The name of this capability.

theAutonomyLevel - The autonomy level of this capability.

theSituations - The situations of this capability

AbleEServerCapability

public AbleEServerCapability(AbleEServerCapability theAbleEServerCapability)
Creates an AbleEServerCapability based off another AbleEServerCapability.

An AbleEServerCapability class defines a capabilty of an AbleEServerAgent. A capability of an agent defines a role or behavior that the agent will take on. This constructor should be used as a copy constructor.

Parameters:
theAbleEServerSituation - The AbleEServerCapability to create a new AbleEServerCapability based off of.
Method Detail

getCapabilityIdentifier

public java.io.Serializable getCapabilityIdentifier()
Method getCapabilityIdentifier

Returns:
The identifier of this capability.

getSituations

public java.util.HashMap getSituations()
Method getSituations

Returns:
A Map of all of the AbleEServerSituations of this capability.

getSituation

public AbleEServerSituation getSituation(java.io.Serializable theSituationIdentifier)
Method getSituation

Parameters:
theSituationIdentifier - The identifier of the situation that is to be returned.

Returns:
The AbleEServerSituation named theSituationIdentifier.

getName

public com.ibm.able.AbleMessageContainer getName()
Method getName

Returns:
The name of this capability.

getAutonomyLevel

public int getAutonomyLevel()
Method getAutonomyLevel

Returns:
The autonomy level of this capability.

setAutonomyLevel

public void setAutonomyLevel(int theAutonomyLevel)
Method setAutonomyLevel

Parameters:
theAutonomyLevel - The autonomy level this capability is to be set to.

debugString

public java.lang.String debugString()
Returns a translated representation of this AbleEServerCapability.

Returns:
The locally translated representation of this AbleEServerCapability.

Copyright

public static java.lang.String Copyright()
Gets the copyright of this class.

Returns:
A string containing this class's copyright statement.

equals

public boolean equals(java.lang.Object o)
Compares this AbleEServerCapability with another to determine if the situations are equal.

AbleEServerCapability are equal if their internal, private, immutable handles are equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - An instance of an AbleEServerCapability that is to be compared to this AbleEServerCapability.

Returns:
true, if this AbleEServerCapability is equal to the specified AbleEServerCapability; false, otherwise.

AbleEServerCapability are equal if their internal, private, immutable handles are equal.


hashCode

public int hashCode()
Return the hashCode for an AbleEServerCapability

The hashCode of an AbleEServerCapability is the sum of the hashCodes of all of the the internal, private, immutable handles of this Object.

Overrides:
hashCode in class java.lang.Object
Returns:
The sum of the hashCodes of all of the internal, private, immutable data members are equal.

toString

public java.lang.String toString()
Returns a brief description of this AbleEServerCapability.

Overrides:
toString in class java.lang.Object
Returns:
A brief description of this AbleEServerCapability.