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

com.ibm.able.platform
Interface AblePlatformAgent

All Superinterfaces:
AbleBeanRemoteContainer, AbleEventListenerRemoteManager, AbleEventQueueRemoteManager, AbleRemoteAgent, AbleRemoteBean, AbleRemoteEventListener, AbleUserDefinedFunctionRemoteManager, java.rmi.Remote, java.io.Serializable
All Known Subinterfaces:
JasKnnDistributedAgentIF, JasNaiveBayesDistributedAgentIF
All Known Implementing Classes:
AblePlatformDefaultAgent

public interface AblePlatformAgent
extends AbleRemoteAgent

This class defines the base interface, or behavior, which all ABLE platform agents must support, especially if they are to be created and managed through Able's Agent Lifecycle Service.


Method Summary
 int getAgentAutonomyLevel()
          Gets the agent's autonomy level.
 java.util.Date getAgentLastUpdate()
          Gets the date and time when the agent's description was last updated with the Agent Directory Service..
 java.lang.String getAgentStatus()
          Gets the agent's current real time status (state).
 AbleMessageContainer getAgentSummary()
          Gets the agent's current summary text.
 java.lang.String getAgentType()
          Gets the agent's type description.
 java.lang.String getAgentVendor()
          Gets the agent's vendor.
 java.lang.String getAgentVersion()
          Gets the agent's version.
 java.util.Hashtable getJasAgentAttributes()
          Gets the agent's JAS attributes.
 java.lang.String getJasAgentName()
          Gets the agent's globally unique ID (GUID or AgentName) in text form.
 void initializeAgent(AbleSecureKey theSecureKey)
          Initializes and configures the agent.
 void initializeAgent(java.lang.Object theInitArg, AbleSecureKey theSecureKey)
          Initializes and configures the agent using the specified parameter, which is typically an Object[], but may be anything that the agent is coded to expect.
 boolean isAgentMovable()
          Determines whether the agent is movable from one agent pool to another.
 boolean isAgentToAutoRegister()
          Determines whether the agent is to register with an RMI Registry at initialization time.
 boolean isAgentToBindToRmi()
          Determines whether the agent is to bind to RMI Naming at initialization time.
 void preInit()
          Pre-initializes the agent immediately after creation, causing the agent to find the Service Root, extract references to various services, obtain a unique AgentName from the Agent Naming Service, and, when security is on, a VerifiableAgentName (VAN).
 void quitAgent(AbleSecureKey theSecureKey)
          Quits the agent, which typically quits all contained beans and agents.
 void resetAgent(AbleSecureKey theSecureKey)
          Resets the agent to its "initialized" state.
 void resumeAgent(AbleSecureKey theSecureKey)
          Resumes all asynchronous threads of control, typically including those in any contained beans and agents.
 void setAgentAutonomyLevel(int theAgentAutonomyLevel, AbleSecureKey theSecureKey)
          Sets the agent's autonomy level.
 void suspendAgent(AbleSecureKey theSecureKey)
          Temporarily suspends all asynchronous threads of control, typically including those in any contained beans and agents.
 
Methods inherited from interface com.ibm.able.AbleRemoteAgent
addEventConnection, getAgentAddr, getAgentHost, getAgentName, getDataSource, isActiveDataSource, removeEventConnection, setActiveDataSource
 
Methods inherited from interface com.ibm.able.AbleRemoteBean
getName, getState, init, init, process, process, quitAll, reset, resumeAll, suspendAll
 
Methods inherited from interface com.ibm.able.AbleRemoteEventListener
handleAbleEvent
 
Methods inherited from interface com.ibm.able.AbleEventListenerRemoteManager
addAbleEventListener, notifyAbleEventListeners, removeAbleEventListener
 
Methods inherited from interface com.ibm.able.AbleEventQueueRemoteManager
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from interface com.ibm.able.AbleBeanRemoteContainer
addBean, containsBean, containsBean, getBean, getBeans, removeAllBeans, removeBean, removeBean
 
Methods inherited from interface com.ibm.able.AbleUserDefinedFunctionRemoteManager
addUserDefinedFunction, containsUserDefinedFunction, getUserDefinedFunction, getUserDefinedFunctions, invokeUserDefinedFunction, removeUserDefinedFunction, setUserDefinedFunctions
 

Method Detail

preInit

public void preInit()
             throws java.rmi.RemoteException
Pre-initializes the agent immediately after creation, causing the agent to find the Service Root, extract references to various services, obtain a unique AgentName from the Agent Naming Service, and, when security is on, a VerifiableAgentName (VAN). Typically, in a secure environment, an agent needs a VerifiableAgentName before any other operations can be performed on it, including initialization. Once an agent has an AgentName (through any means), calls to this method are ignored.
Throws:
java.rmi.RemoteException - On any remote error.

initializeAgent

public void initializeAgent(AbleSecureKey theSecureKey)
                     throws java.rmi.RemoteException,
                            javax.agent.service.naming.NamingException
Initializes and configures the agent. Typically, the agent will create an AgentDescription, fill the description with useful information such as Locators, and register the description with the Agent Directory Service.
Parameters:
theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

initializeAgent

public void initializeAgent(java.lang.Object theInitArg,
                            AbleSecureKey theSecureKey)
                     throws java.rmi.RemoteException,
                            javax.agent.service.naming.NamingException
Initializes and configures the agent using the specified parameter, which is typically an Object[], but may be anything that the agent is coded to expect. Typically, the agent will create an AgentDescription, fill the description with useful information such as Locators, and register the description with the Agent Directory Service.
Parameters:
theInitArg - Argument to the initialization method.

theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

quitAgent

public void quitAgent(AbleSecureKey theSecureKey)
               throws java.rmi.RemoteException,
                      javax.agent.service.naming.NamingException
Quits the agent, which typically quits all contained beans and agents.
Parameters:
theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

suspendAgent

public void suspendAgent(AbleSecureKey theSecureKey)
                  throws java.rmi.RemoteException,
                         javax.agent.service.naming.NamingException
Temporarily suspends all asynchronous threads of control, typically including those in any contained beans and agents.
Parameters:
theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

resumeAgent

public void resumeAgent(AbleSecureKey theSecureKey)
                 throws java.rmi.RemoteException,
                        javax.agent.service.naming.NamingException
Resumes all asynchronous threads of control, typically including those in any contained beans and agents.
Parameters:
theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

resetAgent

public void resetAgent(AbleSecureKey theSecureKey)
                throws java.rmi.RemoteException,
                       javax.agent.service.naming.NamingException
Resets the agent to its "initialized" state.
Parameters:
theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any remote error.
javax.agent.service.naming.NamingException - On any naming error.

getAgentAutonomyLevel

public int getAgentAutonomyLevel()
                          throws java.rmi.RemoteException
Gets the agent's autonomy level.
Returns:
An autonomy level as defined in AblePlatform.
Throws:
java.rmi.RemoteException - On any RMI error.

setAgentAutonomyLevel

public void setAgentAutonomyLevel(int theAgentAutonomyLevel,
                                  AbleSecureKey theSecureKey)
                           throws java.rmi.RemoteException,
                                  javax.agent.service.naming.NamingException
Sets the agent's autonomy level.
Parameters:
theAgentAutonomyLevel - An autonomy level as defined in AblePlatform.

theSecureKey - When security if off, this may be null as the parameter is ignored; when security is on the security key must be from an object with equal or greater authority in order for the operation to proceed.

Throws:
java.rmi.RemoteException - On any RMI error.
AbleException - If the specified autonomy level isn't a level defined in AblePlatform or if the caller is not authorized.
javax.agent.service.naming.NamingException - If the caller is not authenticated.

getAgentLastUpdate

public java.util.Date getAgentLastUpdate()
                                  throws java.rmi.RemoteException
Gets the date and time when the agent's description was last updated with the Agent Directory Service..
Returns:
The date and time the agent's description was last updated.
Throws:
java.rmi.RemoteException - On any RMI error.

getAgentStatus

public java.lang.String getAgentStatus()
                                throws java.rmi.RemoteException
Gets the agent's current real time status (state).
Returns:
The agent's real time status.
Throws:
java.rmi.RemoteException - On any RMI error.

getAgentSummary

public AbleMessageContainer getAgentSummary()
                                     throws java.rmi.RemoteException
Gets the agent's current summary text.
Returns:
The agent's summary current summary text.
Throws:
java.rmi.RemoteException - On any RMI error.

getAgentType

public java.lang.String getAgentType()
                              throws java.rmi.RemoteException
Gets the agent's type description.
Returns:
The agent's type description.
Throws:
java.rmi.RemoteException - On any RMI error.

getAgentVendor

public java.lang.String getAgentVendor()
                                throws java.rmi.RemoteException
Gets the agent's vendor.
Returns:
The agent's vendor.
Throws:
java.rmi.RemoteException - On any RMI error.

getAgentVersion

public java.lang.String getAgentVersion()
                                 throws java.rmi.RemoteException
Gets the agent's version.
Returns:
The agent's version.
Throws:
java.rmi.RemoteException - On any RMI error.

isAgentToAutoRegister

public boolean isAgentToAutoRegister()
                              throws java.rmi.RemoteException
Determines whether the agent is to register with an RMI Registry at initialization time.
Returns:
true if the agent is to register with an RMI Registry; false otherwise.
Throws:
java.rmi.RemoteException - On any RMI error.

isAgentToBindToRmi

public boolean isAgentToBindToRmi()
                           throws java.rmi.RemoteException
Determines whether the agent is to bind to RMI Naming at initialization time.
Returns:
true if the agent is to bind to RMI Naming; false otherwise.
Throws:
java.rmi.RemoteException - On any RMI error.

isAgentMovable

public boolean isAgentMovable()
                       throws java.rmi.RemoteException
Determines whether the agent is movable from one agent pool to another.
Returns:
true if the agent is movable; false otherwise.
Throws:
java.rmi.RemoteException - On any RMI error.

getJasAgentAttributes

public java.util.Hashtable getJasAgentAttributes()
                                          throws java.rmi.RemoteException
Gets the agent's JAS attributes.
Returns:
A cloned collection of the agent's attributes, both those built-in by Able, and those added by the user.
Throws:
java.rmi.RemoteException - On any RMI error.

getJasAgentName

public java.lang.String getJasAgentName()
                                 throws java.rmi.RemoteException
Gets the agent's globally unique ID (GUID or AgentName) in text form.
Returns:
A toString() version of the agent's unique AgentName.
Throws:
java.rmi.RemoteException - On any RMI error.

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

(C) Copyright IBM Corporation 1999, 2003