fipaos.tool.loader
Class AgentLoader


public class AgentLoader

The Agent Loader will instantiate agents specified in the loader profile
in the same java virtual machine.


Constructor Summary
AgentLoader(String platform_profile_location, String loader_profile_name, boolean gui)
          Constructs the agent loader and instantiates the specified agents.

Method Summary
 voidactivate(String agent_name)
          "Activate" the given Agent
 AgentDescriptiongetAgentDescription(String agent)
          Get AgentDesciption for given Agent
 ListgetAgents()
          Get a list of Agents that can be started
 StringgetAgentState(String agent_name)
          Get the state of the Agent with the given name - returns null if no such agent
is alive
 ListgetAliveAgents()
          Get a list of "alive" agents
 static voidmain(String[] args)
           
 voidshutdownAgent(String agent_name)
          Shut down the agent with the given name
 voidshutdownAgent(String agent_name, boolean async)
          Shut down the agent with the given name
 voidshutdownAgents()
          Stops all executing agents
 voidstartAgent(String agent_name, boolean async)
          Starts an agent
 voidstartAgent(String agent_name, String class_name)
          Starts an agent (async)
 voidstartAgent(String agent_name, String class_name, String owner, boolean async)
          Starts an agent
 voidstartAgents()
          Method that starts all Agent that are marked as startable at AgentLoader initialisation

Constructor Detail

AgentLoader

public AgentLoader(String platform_profile_location, String loader_profile_name, boolean gui)
Constructs the agent loader and instantiates the specified agents.
Parameters:
profile_location - Directory where the agent loader profile is stored
file_name - the filename of the profile
Method Detail

activate

public void activate(String agent_name)
"Activate" the given Agent

getAgentDescription

public AgentDescription getAgentDescription(String agent)
Get AgentDesciption for given Agent

getAgents

public List getAgents()
Get a list of Agents that can be started

getAgentState

public String getAgentState(String agent_name)
Get the state of the Agent with the given name - returns null if no such agent
is alive

getAliveAgents

public List getAliveAgents()
Get a list of "alive" agents

main

public static void main(String[] args)

shutdownAgent

public void shutdownAgent(String agent_name)
Shut down the agent with the given name
Parameters:
agent - The agent to be shutdown

shutdownAgent

public void shutdownAgent(String agent_name, boolean async)
Shut down the agent with the given name
Parameters:
agent - The agent to be shutdown
async - Do this asyncronously (with timeout!)

shutdownAgents

public void shutdownAgents()
Stops all executing agents

startAgent

public void startAgent(String agent_name, boolean async)
Starts an agent
Parameters:
agent_name - Name of the Agent (defined in the Loader Profile) to start
async - Start the Agent asyncronously?

startAgent

public void startAgent(String agent_name, String class_name)
Starts an agent (async)
Parameters:
agent_name - Name of the Agent to start
class_name - Name of the class for this Agent

startAgent

public void startAgent(String agent_name, String class_name, String owner, boolean async)
Starts an agent
Parameters:
agent_name - Name of the Agent to start
class_name - Name of the class for this Agent
owner - Owner of the Agent
async - Start the Agent asyncronously?

startAgents

public void startAgents()
Method that starts all Agent that are marked as startable at AgentLoader initialisation

Association Links

to Class java.util.Map

Map of instances of started agents

to Class java.util.Map

Map of all startable agents against AgentDescription

to Class java.util.List

List of started Agents (in order they were started)

to Class java.util.List

List of all startable Agents

to Class fipaos.agent.profile.LoaderProfile

LoaderProfile for this

to Class java.lang.String

Location of platform profile for use when creating agents