gov.nasa.arc.brahms.vm.api.common
Class AgentFactory

java.lang.Object
  extended by gov.nasa.arc.brahms.vm.api.common.AgentFactory

public class AgentFactory
extends java.lang.Object

The AgentFactory provides methods to create new agents.

Version:
$Revision: 1.1 $ $Date: 2007/10/10 14:03:02 $ $Author: rvhoof $
Author:
Ron van Hoof

Constructor Summary
AgentFactory()
           
 
Method Summary
static IAgent createAgent(java.lang.String name, IGroup[] groups, IContext actionCtx)
          createAgent creates a new agent, makes it a member of the specified groups and returns the new agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentFactory

public AgentFactory()
Method Detail

createAgent

public static IAgent createAgent(java.lang.String name,
                                 IGroup[] groups,
                                 IContext actionCtx)
                          throws ExternalException
createAgent creates a new agent, makes it a member of the specified groups and returns the new agent. The new agent is given the specified name. If the name already exists a unique number will be attached to the name.

Parameters:
name - the name of the new agent
groups - the list of IGroup to make the new agent a member of
actionCtx - the IContext for the action
Returns:
IAgent the new agent being a member of the specified groups
Throws:
ExternalException - if the creation of the new agent fails


Copyright © 1997-2012 All Rights Reserved.