|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The AgentLifeCycleService interface defines the operations that can be requested of an Agent Lifecycle Service.
An Agent Lifecycle Service can be used to
Field Summary | |
---|---|
static java.lang.String |
SERVICE_TYPE
The well-known service type, set to "agent-life-cycle-service" . |
Method Summary | |
---|---|
AblePlatformAgent |
createAgentInstance(AbleAgentClassDescription theAgentClassDescription,
java.lang.String theAgentPoolAlias,
AbleSecureKey theSecureKey)
Creates an instance of an agent in a specified agent pool. |
AblePlatformAgent |
createAgentInstanceAndInitialize(AbleAgentClassDescription theAgentClassDescription,
java.lang.String theAgentPoolAlias,
AbleSecureKey theSecureKey)
Creates an instance of an agent in a specified agent pool and initializes the agent using parameters found in the specified AbleAgentClassDescription. |
AblePlatformAgent |
createAgentInstanceAndInitialize(AbleAgentClassDescription theAgentClassDescription,
java.lang.String theAgentPoolAlias,
java.lang.Object theInitArg,
AbleSecureKey theSecureKey)
Creates an instance of an agent in a specified agent pool and initializes the agent using the specified parameters. |
java.util.Vector |
getCreatedAgents(AbleSecureKey theSecureKey)
Gets a collection of all AblePlatformAgent objects created by this particular Agent Lifecycle Service. |
AbleAgentClassDescription[] |
getPermittedAgents()
Gets a collection of agents that are permitted to run on this platform. |
void |
initializeAgent(AblePlatformAgent theAblePlatformAgent,
AbleSecureKey theSecureKey)
Initializes a previously created agent. |
void |
initializeAgent(AblePlatformAgent theAblePlatformAgent,
java.lang.Object theInitArg,
AbleSecureKey theSecureKey)
Initializes a previously created agent instance using the specified initialization argument. |
void |
quiesceAgentPool(java.lang.String theAgentPoolAlias,
AbleSecureKey theSecureKey)
Quiesces the specified agent pool by sending a quitAgent to each agent known to be running in the
pool. |
void |
quitAgent(javax.agent.service.directory.AgentDescription theAgentDescription,
AbleSecureKey theSecureKey)
Requests the agent represented by the specified AgentDescription to quit itself along with any threads the agent owns and any other beans and agents the agent may contain. |
void |
quitAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList,
AbleSecureKey theSecureKey)
Requests each agent represented in the specified AgentDescription list to quit itself along with any threads the agent owns and any other beans and agents the agent may contain. |
void |
resetAgent(javax.agent.service.directory.AgentDescription theAgentDescription,
AbleSecureKey theSecureKey)
Requests the agent represented by the specified AgentDescription to reset itself along with any threads the agent owns and any other beans and agents the agent may contain; however, the agent itself may decide whether to reset any internal agents and beans it may contain. |
void |
resetAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList,
AbleSecureKey theSecureKey)
Requests each agent represented in the specified AgentDescription list to reset itself along with any threads the agent owns and any other beans and agents the agent may contain. |
void |
resumeAgent(javax.agent.service.directory.AgentDescription theAgentDescription,
AbleSecureKey theSecureKey)
Requests the agent represented by the specified AgentDescription to resume itself along with any threads the agent owns and any other beans and agents the agent may contain; however, the agent itself may decide whether to resume any internal agents and beans it may contain. |
void |
resumeAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList,
AbleSecureKey theSecureKey)
Requests each agent represented in the specified AgentDescription list to resume itself along with any threads the agent owns and any other beans and agents the agent may contain. |
void |
suspendAgent(javax.agent.service.directory.AgentDescription theAgentDescription,
AbleSecureKey theSecureKey)
Requests the agent represented by the specified AgentDescription to suspend itself along with any threads the agent owns and any other beans and agents the agent may contain; however, the agent itself may decide whether to suspend any internal agents and beans it may contain. |
void |
suspendAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList,
AbleSecureKey theSecureKey)
Requests each agent represented in the specified AgentDescription list to suspend itself along with any threads the agent owns and any other beans and agents the agent may contain. |
Methods inherited from interface javax.agent.service.Service |
---|
getServiceProperties, setServiceProperties |
Methods inherited from interface com.ibm.able.platform.AblePlatformService |
---|
terminateService |
Methods inherited from interface com.ibm.able.platform.AblePlatformServiceEventGenerator |
---|
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener |
Field Detail |
public static final java.lang.String SERVICE_TYPE
"agent-life-cycle-service"
.Method Detail |
public AbleAgentClassDescription[] getPermittedAgents() throws AgentLifeCycleException, AgentLifeCycleFailure
createAgentInstance
methods to create new
instances of agents in the platform.AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.public AblePlatformAgent createAgentInstance(AbleAgentClassDescription theAgentClassDescription, java.lang.String theAgentPoolAlias, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
If the AbleAgentClassDescription contains constructor parameters, a constructor that matches the parameters will be used, if found. Otherwise, the agent's null argument constructor is used.
The agent is constructed, but not initialized; initialization
must be performed as a separate step by calling one of the
initializeAgent
methods.
theAgentClassDescription
- A class description obtained from the
getPermittedAgents()
method.
The specified class description is verified that it is
one from Agent Lifecycle's internal permitted agent
list so that it cannot be spoofed.
theAgentPoolAlias
- Specifies in which of the agent's eligible agent pools
(defined in the platform preference file) the agent is
to be created.
The specified agent pool is verified against the
agent's class description, so that an agent cannot be
created in an agent pool in which it is not allowed to
run.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- If the AbleAgentClassDescription is null.
If the AbleAgentClassDescription does not exist in the service's actual permitted agent list; that is, the AbleAgentClassDescription appears to have been spoofed.
If the specified agent pool name is not a valid agent pool for the AbleAgentClassDescription.
If the agent represented by the AbleAgentClassDescription is not an AblePlatformAgent.
AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public AblePlatformAgent createAgentInstanceAndInitialize(AbleAgentClassDescription theAgentClassDescription, java.lang.String theAgentPoolAlias, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
If the AbleAgentClassDescription contains constructor parameters, a constructor that matches the parameters will be used, if found. Otherwise, the agent's null argument constructor is used.
If the AbleAgentClassDescription contains intialization parameters, those parameters are packaged into an Object[] that is used to intialize the agent; otherwise, the agent is initialized without any special parameters.
theAgentClassDescription
- A class description obtained from the
getPermittedAgents()
method.
The specified class description is verified that it is
one from Agent Lifecycle's internal permitted agent
list so that it cannot be spoofed.
theAgentPoolAlias
- Specifies in which of the agent's eligible agent pools
(defined in the platform preference file) the agent is
to be created.
The specified agent pool is verified against the
agent's class description, so that an agent cannot be
created in an agent pool in which it is not allowed to
run.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- If the AbleAgentClassDescription is null.
If the AbleAgentClassDescription does not exist in the service's actual permitted agent list; that is, the AbleAgentClassDescription appears to have been spoofed.
If the specified agent pool name is not a valid agent pool for the AbleAgentClassDescription.
If the agent represented by the AbleAgentClassDescription is not an AblePlatformAgent.
AgentLifeCycleFailure
- If the agent cannot be created.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public AblePlatformAgent createAgentInstanceAndInitialize(AbleAgentClassDescription theAgentClassDescription, java.lang.String theAgentPoolAlias, java.lang.Object theInitArg, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
If the AbleAgentClassDescription contains constructor parameters, a constructor that matches the parameters will be used, if found. Otherwise, the agent's null argument constructor is used.
theAgentClassDescription
- A class description obtained from the
getPermittedAgents()
method.
The specified class description is verified that it is
one from Agent Lifecycle's internal permitted agent
list so that it cannot be spoofed.
theAgentPoolAlias
- Specifies in which of the agent's eligible agent pools
(defined in the platform preference file) the agent is
to be created.
The specified agent pool is verified against the
agent's class description, so that an agent cannot be
created in an agent pool in which it is not allowed to
run.
theInitArg
- If the initialization parameter is not null, the agent
is initialized using the specified initialization
parameter; otherwise, the agent is initialized without
any special parameters.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- If the AbleAgentClassDescription is null.
If the AbleAgentClassDescription does not exist in the service's actual permitted agent list; that is, the AbleAgentClassDescription appears to have been spoofed.
If the specified agent pool name is not a valid agent pool for the AbleAgentClassDescription.
If the agent represented by the AbleAgentClassDescription is not an AblePlatformAgent.
AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void initializeAgent(AblePlatformAgent theAblePlatformAgent, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAblePlatformAgent
- The agent to initialize.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void initializeAgent(AblePlatformAgent theAblePlatformAgent, java.lang.Object theInitArg, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAblePlatformAgent
- The agent to initialize.
theInitArg
- The initialization argument; typically this is an
Object[] array, but depends on each agent's init
method.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void quitAgent(javax.agent.service.directory.AgentDescription theAgentDescription, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescription
- The agent to quit.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void quitAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescriptionList
- The agents to quit.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void suspendAgent(javax.agent.service.directory.AgentDescription theAgentDescription, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescription
- The agent to suspend.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void suspendAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescriptionList
- The agents to suspend.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void resumeAgent(javax.agent.service.directory.AgentDescription theAgentDescription, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescription
- The agent to resume.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void resumeAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescriptionList
- The agents to resume.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void resetAgent(javax.agent.service.directory.AgentDescription theAgentDescription, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescription
- The agent to reset.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void resetAgents(javax.agent.service.directory.AgentDescription[] theAgentDescriptionList, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theAgentDescriptionList
- The agents to reset.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public java.util.Vector getCreatedAgents(AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
Each element of the collection is an Object[n] object.
Each element of that is
The collection may be empty, but not null.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.public void quiesceAgentPool(java.lang.String theAgentPoolAlias, AbleSecureKey theSecureKey) throws AgentLifeCycleException, AgentLifeCycleFailure, javax.agent.service.naming.NamingException
quitAgent
to each agent known to be running in the
pool.
Note that there is nothing that prevents new agents from being created in the pool during the time the pool is being quiesced.
theAgentPoolAlias
- The name of an agent pool defined in the platform
preference file.
theSecureKey
- Used when security is on to make sure that the caller
is authentic and has the authority to perform the
operation; may be null when security is off.
AgentLifeCycleException
- On any Agent Lifecycle error.AgentLifeCycleFailure
- When there is a problem in the lifecycle
infrastructure code.javax.agent.service.naming.NamingException
- On any Agent Naming Service error.
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |