fipaos.tool.loader
Class AgentLoader

java.lang.Object
  |
  +--fipaos.tool.loader.AgentLoader

public class AgentLoader
extends java.lang.Object

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


Constructor Summary
AgentLoader(java.lang.String platform_profile_location, java.lang.String loader_profile_name, boolean gui)
          Constructs the agent loader and instantiates the specified agents.
 
Method Summary
 void activate(java.lang.String agent_name)
          "Activate" the given Agent
 AgentDescription getAgentDescription(java.lang.String agent)
          Get AgentDesciption for given Agent
 java.util.List getAgents()
          Get a list of Agents that can be started
 java.lang.String getAgentState(java.lang.String agent_name)
          Get the state of the Agent with the given name - returns null if no such agent is alive
 java.util.List getAliveAgents()
          Get a list of "alive" agents
static void main(java.lang.String[] args)
           
 void shutdownAgent(java.lang.String agent_name)
          Shut down the agent with the given name
 void shutdownAgent(java.lang.String agent_name, boolean async)
          Shut down the agent with the given name
 void shutdownAgents()
          Stops all executing agents
 void startAgent(java.lang.String agent_name, boolean async)
          Starts an agent
 void startAgent(java.lang.String agent_name, java.lang.String class_name)
          Starts an agent (async)
 void startAgent(java.lang.String agent_name, java.lang.String class_name, java.lang.String owner, boolean async)
          Starts an agent
 void startAgents()
          Method that starts all Agent that are marked as startable at AgentLoader initialisation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentLoader

public AgentLoader(java.lang.String platform_profile_location,
                   java.lang.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

getAliveAgents

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

getAgents

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

getAgentDescription

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

getAgentState

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

shutdownAgent

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

shutdownAgent

public void shutdownAgent(java.lang.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!)

startAgent

public void startAgent(java.lang.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(java.lang.String agent_name,
                       java.lang.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(java.lang.String agent_name,
                       java.lang.String class_name,
                       java.lang.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

shutdownAgents

public void shutdownAgents()
Stops all executing agents

activate

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

main

public static void main(java.lang.String[] args)