ABLE 2.0.0 07/02/2003 10:25:01

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)
          Creates an AgentClassDescription.
 
Method Summary
static java.lang.String Copyright()
          Gets the copyright statement of this class.
 java.lang.String getAgentAlias()
          Gets the alias of this agent as it is defined in the platform preference file.
 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 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)
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.

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.

toString

public java.lang.String toString()
Retrieves a string describing (the contents of) the object.
Overrides:
toString in class java.lang.Object
Returns:
A String containing the current contents of the object.

Copyright

public static java.lang.String Copyright()
Gets the copyright statement of this class.
Returns:
this class's copyright statement.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003