org.commonreality.participant
Interface IParticipant

All Superinterfaces:
IIdentifiable, java.io.Serializable
All Known Subinterfaces:
IAgent, IReality, ISensor
All Known Implementing Classes:
AbstractAgent, AbstractParticipant, AbstractSensor, DefaultAuralSensor, DefaultKeyboardSensor, DefaultReality, DefaultSpeechSensor, DefaultSwingSensor, ProgrammaticSensor, XMLSensor

public interface IParticipant
extends IIdentifiable

Someone who is participating in the simulation.

execution sequence:

configure()
initialize()
start()
suspend() & resume()
stop()
reset()
start()
suspend() & resume()
stop()
shutdown()

Author:
developer

Method Summary
 void configure(java.util.Map<java.lang.String,java.lang.String> options)
           
 void connect()
           
 void disconnect()
           
 IAfferentObjectManager getAfferentObjectManager()
           
 IAgentObjectManager getAgentObjectManager()
           
 IClock getClock()
           
 IEfferentCommandManager getEfferentCommandManager()
           
 IEfferentObjectManager getEfferentObjectManager()
           
 IRealObjectManager getRealObjectManager()
           
 ISensorObjectManager getSensorObjectManager()
           
 void initialize()
          initialize this participant.
 boolean isConnected()
           
 boolean isInitialized()
           
 boolean isStarted()
           
 boolean isSuspended()
           
 void reset(boolean clockWillBeReset)
           
 void resume()
           
 java.util.concurrent.Future<IAcknowledgement> send(IMessage message)
          send a message to common reality.
 void shutdown()
           
 void start()
          start the participant
 void stop()
           
 void suspend()
           
 void waitForConnection()
           
 void waitForResumption()
           
 void waitForStart()
           
 void waitForStop()
           
 void waitForSuspension()
           
 
Methods inherited from interface org.commonreality.identifier.IIdentifiable
getIdentifier
 

Method Detail

configure

void configure(java.util.Map<java.lang.String,java.lang.String> options)
               throws java.lang.Exception
Throws:
java.lang.Exception

isInitialized

boolean isInitialized()

initialize

void initialize()
                throws java.lang.Exception
initialize this participant. this is called after the participant has successfully connected to common reality.

Throws:
java.lang.Exception

isStarted

boolean isStarted()

start

void start()
           throws java.lang.Exception
start the participant

Throws:
java.lang.Exception

waitForStart

void waitForStart()
                  throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

isSuspended

boolean isSuspended()

suspend

void suspend()
             throws java.lang.Exception
Throws:
java.lang.Exception

waitForSuspension

void waitForSuspension()
                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

resume

void resume()
            throws java.lang.Exception
Throws:
java.lang.Exception

waitForResumption

void waitForResumption()
                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

stop

void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

waitForStop

void waitForStop()
                 throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

shutdown

void shutdown()
              throws java.lang.Exception
Throws:
java.lang.Exception

reset

void reset(boolean clockWillBeReset)
           throws java.lang.Exception
Throws:
java.lang.Exception

connect

void connect()
             throws java.lang.Exception
Throws:
java.lang.Exception

disconnect

void disconnect()
                throws java.lang.Exception
Throws:
java.lang.Exception

isConnected

boolean isConnected()

waitForConnection

void waitForConnection()
                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

send

java.util.concurrent.Future<IAcknowledgement> send(IMessage message)
send a message to common reality. If the message is an IRequest the Future will contain the IAcknowledgement message. If the message is not an IRequest, the Future will contain null

Parameters:
message -
Returns:

getClock

IClock getClock()

getSensorObjectManager

ISensorObjectManager getSensorObjectManager()

getAfferentObjectManager

IAfferentObjectManager getAfferentObjectManager()

getEfferentObjectManager

IEfferentObjectManager getEfferentObjectManager()

getAgentObjectManager

IAgentObjectManager getAgentObjectManager()

getRealObjectManager

IRealObjectManager getRealObjectManager()

getEfferentCommandManager

IEfferentCommandManager getEfferentCommandManager()
Returns: