org.commonreality.object.manager
Interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>

All Known Subinterfaces:
IAfferentObjectManager, IAgentObjectManager, IEfferentCommandManager, IEfferentObjectManager, IMutableObjectManager<O,L>, IRealObjectManager, IRequestableAfferentObjectManager, IRequestableEfferentObjectManager, IRequestableObjectManager<O,L>, IRequestableRealObjectManager, ISensorObjectManager
All Known Implementing Classes:
AfferentObjectManager, AgentObjectManager, EfferentCommandManager, EfferentObjectManager, GeneralObjectManager, RealObjectManager, RequestableAfferentObjectManager, RequestableEfferentCommandManager, RequestableEfferentObjectManager, RequestableRealObjectManager, SensorObjectManager, SensoryObjectManager

public interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>

An object manager allows a set of simulation objects to be tracked and events fired when they are changed. specific interface exist for all of the simulation objects
This interface is for read only. There are also the IMutableObjectManager and IRequestableObjectManager which permit the modification, addition, and request of objects

Author:
developer

Method Summary
 void addListener(L listener, java.util.concurrent.Executor exector)
          add an event listener
 O get(IIdentifier affId)
          return the simulation object refered to by the identifier
 java.util.Collection<IIdentifier> getIdentifiers()
          return all the identifiers of simulation objects that this manager is tracking
 java.util.Collection<L> getListeners()
          return all the installed listeners
 boolean hasListeners()
          are there any event listeners?
 void removeListener(L listener)
          remove said listener
 void waitForChange()
          wait until something has been added, removed, updated
 

Method Detail

getIdentifiers

java.util.Collection<IIdentifier> getIdentifiers()
return all the identifiers of simulation objects that this manager is tracking

Returns:

get

O get(IIdentifier affId)
return the simulation object refered to by the identifier

Parameters:
affId -
Returns:

addListener

void addListener(L listener,
                 java.util.concurrent.Executor exector)
add an event listener

Parameters:
listener -
exector -

removeListener

void removeListener(L listener)
remove said listener

Parameters:
listener -

hasListeners

boolean hasListeners()
are there any event listeners?

Returns:

getListeners

java.util.Collection<L> getListeners()
return all the installed listeners

Returns:

waitForChange

void waitForChange()
                   throws java.lang.InterruptedException
wait until something has been added, removed, updated

Throws:
java.lang.InterruptedException