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 AbleAgentCapability

    java.lang.Object
      com.ibm.able.platform.AbleAgentCapability

All Implemented Interfaces:
  java.io.Serializable

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

The AbleAgentCapability class defines a role or behavior that an AblePlatformDefaultAgent can take on. An example of an AgentCapability might be "DASD Monitor". An agent with such a capability may be able do many different things while monitoring DASD. For example, it might continually monitor the DASD and other system properties and act on problem situations that it encounters.

Each AgentCapability has one or more AgentSituations for which it watches. An example of an AgentSituation for a "DASD Monitor" AgentCapability might be "DASD is thrashing". An agent typically knows how to handle this situation, but a well behaved agent acts in the way that the autonomy level of this AgentCapability dictates.

Default actions for each autonomy level of an AgentCapability are as follows:

- YES - The agent, on its own, takes any and all actions it deems appropriate when encountering an AgentSituation defined for this AgentCapability.
- ASK - The agent asks for permission to perform any actions that it would normally take when encountering an AgentSituation defined for this capability. (Agents ask for permission by logging a request AgentSituationReport to the AgentLoggingService, where these requests may be picked up and answered by another agent or a human being.)
- NO - The agent does not take any action when encountering an AgentSituation defined for this AgentCapability.

The above define an agent's recommended default behavior for each automation level. An agent may ignore these settings and act in a manner of its own choosing.

The default autonomy level of an AgentCapability is NO.

Since:
  ABLE n.n.n
See Also:
  Serialized Form

Field Summary
`static int` | `ASK_CAPABILITY` Autonomy level: ASK.
`static int` | `NO_CAPABILITY` Autonomy level: NO.
`static int` | `YES_CAPABILITY` Autonomy level: YES.

Constructor Summary
`AbleAgentCapability(AbleAgentCapability theAgentCapability)` Creates an AgentCapability from another AgentCapability (copy constructor).
`AbleAgentCapability(java.io.Serializable theCapabilityIdentifier, AbleMessageContainer theCapabilityName, int theAutonomyLevel, java.util.HashMap theSituations)` Creates an AgentCapability.

Method Summary
`java.lang.String` | `debugString()` Returns a translated representation of this AgentCapability.
`boolean` | `equals(java.lang.Object theObject)` Compares this AgentCapability with another to determine if the situations are equal.
`int` | `getAutonomyLevel()` Method getAutonomyLevel
`java.io.Serializable` | `getCapabilityIdentifier()` Method getCapabilityIdentifier
`AbleMessageContainer` | `getName()` Method getName
`AbleAgentSituation` | `getSituation(java.io.Serializable theSituationIdentifier)` Gets the AgentSituation specified by the situation identifier.
`java.util.HashMap` | `getSituations()` Method getSituations
`int` | `hashCode()` Return the hashCode for an AgentCapability.
`void` | `setAutonomyLevel(int theAutonomyLevel)` Method setAutonomyLevel
`java.lang.String` | `toString()` Returns a brief description of this AgentCapability.

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

  Autonomy level: YES.

  An agent, on its own, takes any and all actions it deems appropriate when encountering an AgentSituation defined for this AgentCapability.

  See Also:
    Constant Field Values

### NO_CAPABILITY

    public static final int NO_CAPABILITY

  Autonomy level: NO.

  An agent does not take any action when encountering an AgentSituation defined for this AgentCapability.

  See Also:
    Constant Field Values

### ASK_CAPABILITY

    public static final int ASK_CAPABILITY

  Autonomy level: ASK.

  An agent asks for permission to perform any actions that it would normally take when encountering an AgentSituation defined for this capability.

  Agents ask for permission by logging a request AgentSituationReport to the AgentLoggingService, where these requests may be picked up and answered by another agent or a human being.

  See Also:
    Constant Field Values

Constructor Detail

### AbleAgentCapability

    public AbleAgentCapability(java.io.Serializable theCapabilityIdentifier,
                               AbleMessageContainer theCapabilityName,
                               int theAutonomyLevel,
                               java.util.HashMap theSituations)

  Creates an AgentCapability.

  An AgentCapability class defines a capabilty of an AblePlatformDefaultAgent. A capability of an agent defines a role or behavior that the agent can take on.

Parameters:
  `theCapabilityIdentifier` - An identifier for this AgentCapability.
  `theCapabilityName` - The name of this AgentCapability.
  `theAutonomyLevel` - The autonomy level of this AgentCapability. Must be one of:
  - YES_CAPABILITY
  - NO_CAPABILITY
  - ASK_CAPABILITY
  `theSituations` - A map of AgentSituations that this AgentCapability may encounter. The key to the map is each situation's SituationIdentifier.

### AbleAgentCapability

    public AbleAgentCapability(AbleAgentCapability theAgentCapability)

  Creates an AgentCapability from another AgentCapability (copy constructor).

  An AgentCapability class defines a capabilty of an AblePlatformDefaultAgent. A capability of an agent defines a role or behavior that the agent can take on.

Parameters:
  `theAgentCapability` - The AgentCapability with which to create a new AgentCapability.

Method Detail

### getCapabilityIdentifier

    public java.io.Serializable getCapabilityIdentifier()

  Method getCapabilityIdentifier

  Returns:
    The identifier of this AgentCapability.

### getName

    public AbleMessageContainer getName()

  Method getName

  Returns:
    The name of this AgentCapability.

### setAutonomyLevel

    public void setAutonomyLevel(int theAutonomyLevel)

  Method setAutonomyLevel

  Parameters:
    `theAutonomyLevel` - The autonomy level to which this AgentCapability is to be set. Must be one of:
    - YES_CAPABILITY
    - NO_CAPABILITY
    - ASK_CAPABILITY

### getAutonomyLevel

    public int getAutonomyLevel()

  Method getAutonomyLevel

  Returns:
    The autonomy level of this AgentCapability.

### getSituations

    public java.util.HashMap getSituations()

  Method getSituations

  Returns:
    A reference to the Map of all of the AgentSituations contained in this AgentCapability.

### getSituation

    public AbleAgentSituation getSituation(java.io.Serializable theSituationIdentifier)

  Gets the AgentSituation specified by the situation identifier.

  Parameters:
    `theSituationIdentifier` - The identifier of the AgentSituation that is to be returned.
  Returns:
    The AgentSituation identified by `theSituationIdentifier`.

### debugString

    public java.lang.String debugString()

  Returns a translated representation of this AgentCapability.

  Returns:
    The locally translated representation of this AgentCapability.

### equals

    public boolean equals(java.lang.Object theObject)

  Compares this AgentCapability with another to determine if the situations are equal.

  AgentCapability are equal if their Identifiers, Names, Autonomy Levels, and contained Situations are all equal.

  Parameters:
    `theObject` - An instance of an AgentCapability that is to be compared to this AgentCapability.
  Returns:
    true, if this AgentCapability is equal to the specified AgentCapability; false, otherwise.

### hashCode

    public int hashCode()

  Return the hashCode for an AgentCapability.

  The hashCode of an AgentCapability is the sum of the hashCodes of all of the the internal, private, immutable handles of this 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 AgentCapability.

  Returns:
    A brief description of this AgentCapability.

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