Interface MicroAgentContainer

All Superinterfaces:
MicroAgentServer

public interface MicroAgentContainer extends 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 Details

    • addMicroAgent

      MicroAgentID addMicroAgent(MicroAgent micro, String[] args) throws MicroAgentException
      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 add
      args - Arguments to be passed to the microagent upon registration
      Throws:
      MicroAgentException - If the microagent could not be added.
    • removeMicroAgent

      void removeMicroAgent(MicroAgent micro) throws MicroAgentException
      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 the addMicroAgent method.
      Throws:
      MicroAgentException - If the microagent could not be removed
    • addContainerEventListener

      void addContainerEventListener(ContainerEventListener l)
      Registers a listener which receives microagent add/remove events.
      Parameters:
      l - The listener
    • removeContainerEventListener

      void removeContainerEventListener(ContainerEventListener l)
      Removes a listener
      Parameters:
      l - The listener