org.commonreality.participant.impl
Class RequestableEfferentCommandManager

java.lang.Object
  extended by org.commonreality.object.manager.impl.GeneralObjectManager<IEfferentCommand,IEfferentCommandListener>
      extended by org.commonreality.efferent.impl.EfferentCommandManager
          extended by org.commonreality.participant.impl.RequestableEfferentCommandManager
All Implemented Interfaces:
IEfferentCommandManager, IMutableObjectManager<IEfferentCommand,IEfferentCommandListener>, IObjectManager<IEfferentCommand,IEfferentCommandListener>, IRequestableObjectManager<IEfferentCommand,IEfferentCommandListener>

public class RequestableEfferentCommandManager
extends EfferentCommandManager
implements IRequestableObjectManager<IEfferentCommand,IEfferentCommandListener>

Author:
developer

Constructor Summary
RequestableEfferentCommandManager(IParticipant participant)
           
 
Method Summary
 void addFreeIdentifiers(java.util.Collection<IIdentifier> freeIdentifiers)
          When a new block of identifiers is made available from CR, they are added to the object manager
 void prefetch(IIdentifier sensorIdentifier)
           
 IEfferentCommand request(IIdentifier sensorIdentifier)
          Deprecated. 
 IIdentifier requestIdentifier(IIdentifier sensorIdentifier)
           
 
Methods inherited from class org.commonreality.efferent.impl.EfferentCommandManager
getEfferentCommands, getEfferentCommands
 
Methods inherited from class org.commonreality.object.manager.impl.GeneralObjectManager
add, add, addListener, contains, get, getIdentifiers, getListeners, hasListeners, remove, remove, removeListener, update, update, waitForChange
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.commonreality.object.manager.IMutableObjectManager
add, add, remove, remove, update, update
 
Methods inherited from interface org.commonreality.object.manager.IObjectManager
addListener, get, getIdentifiers, getListeners, hasListeners, removeListener, waitForChange
 

Constructor Detail

RequestableEfferentCommandManager

public RequestableEfferentCommandManager(IParticipant participant)
Method Detail

addFreeIdentifiers

public void addFreeIdentifiers(java.util.Collection<IIdentifier> freeIdentifiers)
Description copied from interface: IRequestableObjectManager
When a new block of identifiers is made available from CR, they are added to the object manager

Specified by:
addFreeIdentifiers in interface IRequestableObjectManager<IEfferentCommand,IEfferentCommandListener>
See Also:
IRequestableObjectManager.addFreeIdentifiers(java.util.Collection)

request

@Deprecated
public IEfferentCommand request(IIdentifier sensorIdentifier)
Deprecated. 

Not implemented, will throw a RuntimeException if called. This is becaused IEfferentCommand's are customized based on the need and we cannot use a default implementation (as in AfferentObject and EfferentObject). Agents should rather call requestIdentifier(IIdentifier) to get the IIdentifier and then instantiate the appropriate during the call to IEfferentCommandTemplate.instantiate(org.commonreality.agents.IAgent, org.commonreality.object.IEfferentObject)

Specified by:
request in interface IRequestableObjectManager<IEfferentCommand,IEfferentCommandListener>
Returns:
See Also:
IRequestableObjectManager.request(org.commonreality.identifier.IIdentifier)

requestIdentifier

public IIdentifier requestIdentifier(IIdentifier sensorIdentifier)
Specified by:
requestIdentifier in interface IRequestableObjectManager<IEfferentCommand,IEfferentCommandListener>

prefetch

public void prefetch(IIdentifier sensorIdentifier)