org.commonreality.efferent.impl
Class AbstractEfferentCommand

java.lang.Object
  extended by org.commonreality.object.manager.impl.BasicObject
      extended by org.commonreality.efferent.impl.AbstractEfferentCommand
All Implemented Interfaces:
java.io.Serializable, IEfferentCommand, IIdentifiable, IMutableObject, ISensoryObject, ISimulationObject
Direct Known Subclasses:
MovementCommand, VocalizationCommand

public class AbstractEfferentCommand
extends BasicObject
implements IEfferentCommand

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.commonreality.efferent.IEfferentCommand
IEfferentCommand.ActualState, IEfferentCommand.RequestedState
 
Field Summary
 
Fields inherited from interface org.commonreality.efferent.IEfferentCommand
ACTUAL_STATE, COMMAND_CLASS_NAME, EFFERENT_ID, ESTIMATED_DURATION, REQUESTED_START_TIME, REQUESTED_STATE, RESULT
 
Constructor Summary
AbstractEfferentCommand(IIdentifier identifier)
           
 
Method Summary
 IEfferentCommand.ActualState getActualState()
           
 ISensoryIdentifier getEfferentIdentifier()
          the efferent object that this command is operating on
 double getEstimatedDuration()
           
 ISensoryIdentifier getIdentifier()
           
 double getRequestedStartTime()
           
 IEfferentCommand.RequestedState getRequestedState()
           
 java.lang.Object getResult()
          what happend to interrupt the command or some outcome of the command
 void setEfferentIdentifier(IIdentifier identifier)
           
 boolean setProperty(java.lang.String name, java.lang.Object value)
           
 IEfferentCommand.ActualState waitForActualStateChange(IEfferentCommand.ActualState waitWhileState)
          will block until the state is not waitWhileState
 
Methods inherited from class org.commonreality.object.manager.impl.BasicObject
equals, getProperties, getProperty, getPropertyMap, hashCode, hasProperty, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.commonreality.object.ISimulationObject
getProperties, getProperty, getPropertyMap, hasProperty
 

Constructor Detail

AbstractEfferentCommand

public AbstractEfferentCommand(IIdentifier identifier)
Method Detail

setEfferentIdentifier

public void setEfferentIdentifier(IIdentifier identifier)

getIdentifier

public ISensoryIdentifier getIdentifier()
Specified by:
getIdentifier in interface IIdentifiable
Specified by:
getIdentifier in interface ISensoryObject
Overrides:
getIdentifier in class BasicObject
Returns:
identifier
See Also:
IIdentifiable.getIdentifier()

getEfferentIdentifier

public ISensoryIdentifier getEfferentIdentifier()
Description copied from interface: IEfferentCommand
the efferent object that this command is operating on

Specified by:
getEfferentIdentifier in interface IEfferentCommand
Returns:

getResult

public java.lang.Object getResult()
Description copied from interface: IEfferentCommand
what happend to interrupt the command or some outcome of the command

Specified by:
getResult in interface IEfferentCommand
Returns:

getActualState

public IEfferentCommand.ActualState getActualState()
Specified by:
getActualState in interface IEfferentCommand

getRequestedState

public IEfferentCommand.RequestedState getRequestedState()
Specified by:
getRequestedState in interface IEfferentCommand

getEstimatedDuration

public double getEstimatedDuration()
Specified by:
getEstimatedDuration in interface IEfferentCommand

getRequestedStartTime

public double getRequestedStartTime()
Specified by:
getRequestedStartTime in interface IEfferentCommand

setProperty

public boolean setProperty(java.lang.String name,
                           java.lang.Object value)
Specified by:
setProperty in interface IMutableObject
Overrides:
setProperty in class BasicObject

waitForActualStateChange

public IEfferentCommand.ActualState waitForActualStateChange(IEfferentCommand.ActualState waitWhileState)
                                                      throws java.lang.InterruptedException
Description copied from interface: IEfferentCommand
will block until the state is not waitWhileState

Specified by:
waitForActualStateChange in interface IEfferentCommand
Returns:
Throws:
java.lang.InterruptedException