ubiware.core
Class CommandHandlingBehavior

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by jade.core.behaviours.CyclicBehaviour
              extended by ubiware.core.CommandHandlingBehavior
All Implemented Interfaces:
java.io.Serializable

public class CommandHandlingBehavior
extends jade.core.behaviours.CyclicBehaviour

This class implements a cyclic behavior that manages the execution of commands given to the agent. 15.3.2010

Author:
Michael Cochez for UBIWARE project
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
jade.core.behaviours.Behaviour.RunnableChangedEvent
 
Field Summary
 
Fields inherited from class jade.core.behaviours.Behaviour
myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
CommandHandlingBehavior(UbiwareAgent agent)
          Creates the bahavior
 
Method Summary
 void action()
           
 void addCommand(UbiwareAgentCommand<?> command)
          Add a command that will be executed later.
 
Methods inherited from class jade.core.behaviours.CyclicBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandHandlingBehavior

public CommandHandlingBehavior(UbiwareAgent agent)
Creates the bahavior

Parameters:
agent - the agent this CommandHandler belongs to.
Method Detail

addCommand

public void addCommand(UbiwareAgentCommand<?> command)
Add a command that will be executed later.

Parameters:
command - The command which should get executed.

action

public void action()
Specified by:
action in class jade.core.behaviours.Behaviour