com.cometway.ak
Class AgentCommand

java.lang.Object
  extended by com.cometway.ak.AgentCommand
All Implemented Interfaces:
CommandInterface

public class AgentCommand
extends java.lang.Object
implements CommandInterface

This is a com.cometway.states.CommandInterface implementation for standard AgentInterface agents with initProps, start, stop, and destroy methods. No other command names are supported.


Constructor Summary
AgentCommand(AgentInterface agent, java.lang.String name)
          Constructor for this class.
 
Method Summary
 void execute()
          Executes the command on the agent.
 java.lang.String getName()
          Returns the name of this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentCommand

public AgentCommand(AgentInterface agent,
                    java.lang.String name)
Constructor for this class.

Parameters:
agent - the recipient of the method call
name - of the command (method) to execute
Method Detail

getName

public java.lang.String getName()
Returns the name of this command.

Specified by:
getName in interface CommandInterface

execute

public void execute()
             throws CommandException
Executes the command on the agent.

Specified by:
execute in interface CommandInterface
Throws:
CommandException - if there was a problem.