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 AbleAgentClassDescription

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

All Implemented Interfaces:
  java.io.Serializable

public final class AbleAgentClassDescription
extends java.lang.Object
implements java.io.Serializable

An instance of this class contains information about an individual agent that the Agent Lifecycle Service may create within the distributed platform; a platform console (or some other object) can obtain a collection of AgentClassDescription objects from the Agent Lifecycle Service and then use the descriptions in conjunction with the Agent Lifecycle Service to create instances of new agents within the platform.

The information contained within this class is derived from the agent definition section of the user's file.

See Also:
  Serialized Form

Constructor Summary
`AbleAgentClassDescription(java.lang.String theAgentAlias, java.lang.String theClassName, java.lang.String theVendor, java.lang.String theVersion, java.lang.String theType, java.lang.String theLastChangedDate, int theAutonomyLevel, java.util.Vector theConstructorArgs, java.util.Vector theInitArgs, java.util.Vector theEligibleAgentPools, java.util.Vector theEligiblePrincipals, java.util.HashMap theAgentProperties)` Creates an AgentClassDescription.

Method Summary
`java.lang.String` | `getAgentAlias()` Gets the alias of this agent as it is defined in the platform preference file.
`java.util.HashMap` | `getAgentProperties()` Gets the collection of defined properties for this agent.
`int` | `getAutonomyLevel()` Gets the autonomy level of this agent as it is defined in the platform preference file.
`java.lang.String` | `getClassName()` Gets the fully qualified class name of this agent as it is defined in the platform preference file.
`java.util.Vector` | `getConstructorArgs()` Gets the collection of arguments to be passed to this agent's constructor when the agent is created as they are defined in the platform preference file.
`java.util.Vector` | `getEligibleAgentPools()` Gets the collection of defined AgentPools on which this agent is permitted to be created and run as they are defined in the platform preference file.
`java.util.Vector` | `getEligiblePrincipals()` Gets the collection of defined principals that are permitted to run this agent as they are defined in the platform preference file.
`java.util.Vector` | `getInitArgs()` Gets the collection of arguments to be passed to this agent's `init(Object)` method when the agent is initialized as they are defined in the platform preference file.
`java.lang.String` | `getLastChangedDate()` Gets the date and time that this agent's code was last changed as it is defined in the platform preference file.
`java.lang.String` | `getSystemForAgentPoolAlias(java.lang.String theAlias)` Given an agent pool alias, returns the system name for that alias.
`java.lang.String` | `getType()` Gets the type of this agent as it is defined in the platform preference file.
`java.lang.String` | `getVendor()` Gets the vendor of this agent as it is defined in the platform preference file.
`java.lang.String` | `getVersion()` Gets the version of this agent as it is defined in the platform preference file.
`void` | `setAutonomyLevel(int theAutonomyLevel)` Sets the autonomy level of this agent, overriding that which is defined in the platform preference file.
`void` | `setConstructorArgs(java.util.Vector theConstructorArgs)` Sets the constructor arguments of this agent, overriding those that are defined in the platform preference file.
`void` | `setInitArgs(java.util.Vector theInitArgs)` Sets the initialization arguments of this agent, overriding those that are defined in the platform preference file.
`void` | `setLastChangedDate(java.lang.String theLastChangedDate)` Sets the last changed date of this agent, overriding that which is defined in the platform preference file.
`void` | `setType(java.lang.String theType)` Sets the type of this agent, overriding that which is defined in the platform preference file.
`void` | `setVersion(java.lang.String theVersion)` Sets the version of this agent, overriding that which is defined in the platform preference file.
`java.lang.String` | `toString()` Retrieves a string describing (the contents of) the object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AbleAgentClassDescription

    public AbleAgentClassDescription(java.lang.String theAgentAlias,
                                     java.lang.String theClassName,
                                     java.lang.String theVendor,
                                     java.lang.String theVersion,
                                     java.lang.String theType,
                                     java.lang.String theLastChangedDate,
                                     int theAutonomyLevel,
                                     java.util.Vector theConstructorArgs,
                                     java.util.Vector theInitArgs,
                                     java.util.Vector theEligibleAgentPools,
                                     java.util.Vector theEligiblePrincipals,
                                     java.util.HashMap theAgentProperties)

  Creates an AgentClassDescription.

  Except for `theAgentAlias`, `theClassName`, `theConstructorArgs`, `theInitArgs`, `theEligibleAgentPools`, and `theEligiblePrincipals`, all fields are for information purposes only and hold no special meaning in ABLE.

Parameters:
  `theAgentAlias` - An alias for this particular agent description.

  `theClassName` - The fully qualified class name of the agent; for example, `"com.foo.bar.baz.Agent"`. The specified class must be available via the CLASSPATH on all systems on which this agent can be created.

  Class name must not be null or the empty string.

  The class name cannot be changed once set by the constructor.

  `theVendor` - The supplier of the agent.

  The vendor cannot be changed once set by the constructor.

  `theVersion` - The version of the agent.

  `theType` - The type of agent.

  `theLastChangedDate` - A timestamp indicating when the agent code was last changed.

  `theAutonomyLevel` - The autonomy level of the agent.

  `theConstructorArgs` - If no arguments are to be passed to the agent when it is created, this parameter must be an empty collection (that is, it must not be null); otherwise, this parameter is a collection of arguments passed to an agent's constructor method when it is created by the Agent Lifecycle Service.

  Each element in the collection must be one of the following data types:

  - Boolean
  - Byte
  - Character
  - Double
  - Float
  - Integer
  - Long
  - Short
  - String
  and the order and data type must match that of a constructor for the agent.

  The input colection is cloned before it is saved in this object.

  `theInitArgs` - If no arguments are to be passed to the agent when it is initialized, this parameter must be an empty collection (that is, it must not be null); otherwise, this parameter is a collection of initialization arguments passed to an agent when its `init(Object)` method is invoked by the Agent Lifecycle Service after the agent is created.

  Each element in the collection must be one of the following data types:

  - Boolean
  - Byte
  - Character
  - Double
  - Float
  - Integer
  - Long
  - Short
  - String
  and the order and data type must match that expected by the agent's `init(Object)` method, which will receive the arguments in an `Object[]`.

  The input collection is cloned before it is saved in this object.

  `theEligibleAgentPools` - A collection of AgentPool definitions where the agent is permitted to run. Each element of the collection is a three element string array where the first element (index 0) is the alias of the AgentPool as defined in the preferences file; the second element (index 1) is the IP address (name or number) of the system containing the AgentPool; and element three (index 2) is the port number on which the system's AgentPool is listening. For example, the colection may look like:

                  ["TrustedPool"   "al.binford.tools.com"  "55551"]
                  ["UntrustedPool" "tim.binford.tools.com" "55599"]

  all of which must be defined in the platform preference file.

  The input collection is cloned before it is saved in this object.

  `theEligiblePrincipals` - If platform security is off, this parameter may be an empty collection; otherwise, this parameter must be a collection of AblePlatformPreferences.PrincipalEntry_ objects indicating who is allowed to create and run the agent.

  Each Principal must be defined in the platform preference file.

  The input collection is cloned before it is saved in this object.

  `theAgentProperties` - A set of properties for the agent. Must not be null, but can be empty.

  The input collection is cloned before it is saved in this object.

Method Detail

### getAgentAlias

    public java.lang.String getAgentAlias()

  Gets the alias of this agent as it is defined in the platform preference file.

  Returns:
    the agent's alias.

### setAutonomyLevel

    public void setAutonomyLevel(int theAutonomyLevel)

  Sets the autonomy level of this agent, overriding that which is defined in the platform preference file.

  Parameters:
    `theAutonomyLevel` - the autonomy level for newly created agents of this class.

### getAutonomyLevel

    public int getAutonomyLevel()

  Gets the autonomy level of this agent as it is defined in the platform preference file.

  Returns:
    the agent's autonomy level.

### getClassName

    public java.lang.String getClassName()

  Gets the fully qualified class name of this agent as it is defined in the platform preference file. The named class must be available via the CLASSPATH on all eligible systems on which this agent can be created.

  Returns:
    the agent's fully qualified class name.

### setConstructorArgs

    public void setConstructorArgs(java.util.Vector theConstructorArgs)

  Sets the constructor arguments of this agent, overriding those that are defined in the platform preference file.

  Parameters:
    `theConstructorArgs` - the constructor arguments for newly created agents of this class.

### getConstructorArgs

    public java.util.Vector getConstructorArgs()

  Gets the collection of arguments to be passed to this agent's constructor when the agent is created as they are defined in the platform preference file.

  Returns:
    the collection of constructor arguments for this agent. Each element of the collection is an object of one of the following types:
    - Boolean
    - Byte
    - Character
    - Double
    - Float
    - Integer
    - Long
    - Short
    - String

### getEligibleAgentPools

    public java.util.Vector getEligibleAgentPools()

  Gets the collection of defined AgentPools on which this agent is permitted to be created and run as they are defined in the platform preference file.

  Returns:
    the collection of defined AgentPools where this agent is permitted to run. Each element of the collection is an `AblePlatformPreferences.AgentPoolEntry_` object.

### getEligiblePrincipals

    public java.util.Vector getEligiblePrincipals()

  Gets the collection of defined principals that are permitted to run this agent as they are defined in the platform preference file.

  Returns:
    the collection of principals that are permitted to run this agent. Each element of the collection is an `AblePlatformPreferences.PrincipalEntry_` object.

### setInitArgs

    public void setInitArgs(java.util.Vector theInitArgs)

  Sets the initialization arguments of this agent, overriding those that are defined in the platform preference file.

  Parameters:
    `theInitArgs` - the initialization arguments for newly created agents of this class.

### getInitArgs

    public java.util.Vector getInitArgs()

  Gets the collection of arguments to be passed to this agent's `init(Object)` method when the agent is initialized as they are defined in the platform preference file.

  Returns:
    the collection of initialization arguments for this agent. Each element of the collection is an object of one of the following types:
    - Boolean
    - Byte
    - Character
    - Double
    - Float
    - Integer
    - Long
    - Short
    - String

### setLastChangedDate

    public void setLastChangedDate(java.lang.String theLastChangedDate)

  Sets the last changed date of this agent, overriding that which is defined in the platform preference file.

  Parameters:
    `theLastChangedDate` - the last changed date for newly created agents of this class.

### getLastChangedDate

    public java.lang.String getLastChangedDate()

  Gets the date and time that this agent's code was last changed as it is defined in the platform preference file.

  Returns:
    A string indicating when the agent's code was last changed.

### setType

    public void setType(java.lang.String theType)

  Sets the type of this agent, overriding that which is defined in the platform preference file.

  Parameters:
    `theType` - the type for newly created agents of this class.

### getType

    public java.lang.String getType()

  Gets the type of this agent as it is defined in the platform preference file.

  Returns:
    the agent's type.

### getVendor

    public java.lang.String getVendor()

  Gets the vendor of this agent as it is defined in the platform preference file.

  Returns:
    the agent's vendor.

### setVersion

    public void setVersion(java.lang.String theVersion)

  Sets the version of this agent, overriding that which is defined in the platform preference file.

  Parameters:
    `theVersion` - the version for newly created agents of this class.

### getVersion

    public java.lang.String getVersion()

  Gets the version of this agent as it is defined in the platform preference file.

  Returns:
    the agent's version.

### getAgentProperties

    public java.util.HashMap getAgentProperties()

  Gets the collection of defined properties for this agent.

  Returns:
    the collection of defined properties for this agent. Keys and values must be String objects. This collection may be empty, but not null.

### getSystemForAgentPoolAlias

    public java.lang.String getSystemForAgentPoolAlias(java.lang.String theAlias)

  Given an agent pool alias, returns the system name for that alias.

  Returns:
    The system name of the given agent pool.
  Since:
    ABLE 2.3.0

### toString

    public java.lang.String toString()

  Retrieves a string describing (the contents of) the object.

  Returns:
    A String containing the current contents of the object.

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