Package COM.TIBCO.hawk.agent.nest
Interface MicroAgentContainer
- All Superinterfaces:
MicroAgentServer
A MicroAgentContainer is used to hold active microagents in the agent.
It can be used to add and remove microagents in the TIB Hawk agent.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters a listener which receives microagent add/remove events.addMicroAgent(MicroAgent micro, String[] args) Adds a microagent to the container.voidRemoves a listenervoidremoveMicroAgent(MicroAgent micro) Used to remove a microagent from the container.Methods inherited from interface COM.TIBCO.hawk.talon.MicroAgentServer
describe, getMicroAgentIDs, getMicroAgentIDs, getMicroAgentIDs, groupOp, invoke, shutdown, subscribe
-
Method Details
-
addMicroAgent
Adds a microagent to the container.Once this method is called, the microagent's initializeMicroAgent() method is called first. If the microagent is also a ServiceMicroAgent, then its setMicroAgentContainer() method will be called next. This is followed by a call to the describeMicroAgent() method. Finally, once the microagent has been successfully loaded into the container, its thisMicroAgentAdded() method will be called.
- Parameters:
micro- The microagent to addargs- Arguments to be passed to the microagent upon registration- Throws:
MicroAgentException- If the microagent could not be added.
-
removeMicroAgent
Used to remove a microagent from the container. The microagent's thisMicroAgentRemoved() method will be called after it has been removed.- Parameters:
micro- The microagent to remove. This must be the same MicroAgent object that was used to add the microagent in theaddMicroAgentmethod.- Throws:
MicroAgentException- If the microagent could not be removed
-
addContainerEventListener
Registers a listener which receives microagent add/remove events.- Parameters:
l- The listener
-
removeContainerEventListener
Removes a listener- Parameters:
l- The listener
-