com.agentfactory.platform.core
Class AgentContainer

java.lang.Object
  extended by java.util.Observable
      extended by com.agentfactory.platform.core.AgentContainer

public class AgentContainer
extends java.util.Observable

A container for all classes running on the Platform.


Constructor Summary
AgentContainer(AgentPlatform platform)
          Create an agent container, initialising the container, and setting the parent platform.
 
Method Summary
 void add(Agent inAgent, java.lang.String inName)
          Add an agent to the agent container, notifiying any observers of the update.
 Agent get(java.lang.String name)
          Get a specific agent from the container.
 java.util.ArrayList getAgents()
          Get a list of all agents held in the container.
 java.util.ArrayList getPlatformSpecificAgentNames()
          Returns a list of Strings that represent the agents that have platform specific names.
 boolean modify(java.lang.String oldName, java.lang.String newName)
           
 void notify(java.lang.String message)
           
 boolean resume(java.lang.String name)
          Resume an agent's actions.
 boolean suspend(java.lang.String name)
          Suspend an agent.
 boolean terminate(java.lang.String name)
          Terminate an agent.
 void terminateAllAgents()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentContainer

public AgentContainer(AgentPlatform platform)
Create an agent container, initialising the container, and setting the parent platform.

Method Detail

add

public void add(Agent inAgent,
                java.lang.String inName)
Add an agent to the agent container, notifiying any observers of the update.


getAgents

public java.util.ArrayList getAgents()
Get a list of all agents held in the container.


get

public Agent get(java.lang.String name)
Get a specific agent from the container.


resume

public boolean resume(java.lang.String name)
Resume an agent's actions.


suspend

public boolean suspend(java.lang.String name)
Suspend an agent.


terminate

public boolean terminate(java.lang.String name)
Terminate an agent.


terminateAllAgents

public void terminateAllAgents()

modify

public boolean modify(java.lang.String oldName,
                      java.lang.String newName)

getPlatformSpecificAgentNames

public java.util.ArrayList getPlatformSpecificAgentNames()
Returns a list of Strings that represent the agents that have platform specific names.

Returns:
ArrayList

notify

public void notify(java.lang.String message)