public interface IParticipant extends IIdentifiable
Modifier and Type | Interface and Description |
---|---|
static class |
IParticipant.State |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.util.Map<java.lang.String,java.lang.String> options)
configure the participant.
|
void |
connect()
connect
|
void |
disconnect()
disconnect, reverting to unknown
|
void |
disconnect(boolean force)
force the system to disconnect, regardless of its current state
|
IAfferentObjectManager |
getAfferentObjectManager() |
IAgentObjectManager |
getAgentObjectManager() |
IClock |
getClock() |
IEfferentCommandManager |
getEfferentCommandManager() |
IEfferentObjectManager |
getEfferentObjectManager() |
INotificationManager |
getNotificationManager() |
IRealObjectManager |
getRealObjectManager() |
ISensorObjectManager |
getSensorObjectManager() |
IParticipant.State |
getState()
return the current state of the participant, and, if initialized, the state
of the simulation
|
void |
initialize()
initialize this participant.
|
void |
reset(boolean clockWillBeReset)
reset a stopped participant, reverting to initialized
|
void |
resume()
resume a suspended participant and return state to started.
|
java.util.concurrent.Future<IAcknowledgement> |
send(IMessage message)
send a message to common reality.
|
void |
shutdown()
shutdown the participant if it is stopped and disconnect
|
void |
shutdown(boolean force)
shutdown, disconnect, without checking states
|
void |
start()
start the participant, if the participant is not initialized, it will throw
an
IllegalStateException |
boolean |
stateMatches(IParticipant.State... states) |
void |
stop()
stop the participant if it is started or suspended
|
void |
suspend()
suspend the participant if it is started.
|
IParticipant.State |
waitForState(IParticipant.State... states)
wait until the participant's state is one of these.
|
IParticipant.State |
waitForState(long waitTime,
IParticipant.State... states) |
getIdentifier
IParticipant.State getState()
boolean stateMatches(IParticipant.State... states)
IParticipant.State waitForState(IParticipant.State... states) throws java.lang.InterruptedException
states
- java.lang.InterruptedException
IParticipant.State waitForState(long waitTime, IParticipant.State... states) throws java.lang.InterruptedException
java.lang.InterruptedException
void configure(java.util.Map<java.lang.String,java.lang.String> options) throws java.lang.Exception
options
- java.lang.Exception
void initialize() throws java.lang.Exception
IllegalStateException
java.lang.Exception
void start() throws java.lang.Exception
IllegalStateException
java.lang.Exception
void suspend() throws java.lang.Exception
java.lang.Exception
void resume() throws java.lang.Exception
java.lang.Exception
void stop() throws java.lang.Exception
java.lang.Exception
void shutdown() throws java.lang.Exception
java.lang.Exception
void shutdown(boolean force) throws java.lang.Exception
force
- java.lang.Exception
void reset(boolean clockWillBeReset) throws java.lang.Exception
clockWillBeReset
- java.lang.Exception
void connect() throws java.lang.Exception
java.lang.Exception
void disconnect() throws java.lang.Exception
java.lang.Exception
void disconnect(boolean force) throws java.lang.Exception
force
- java.lang.Exception
java.util.concurrent.Future<IAcknowledgement> send(IMessage message)
IRequest
the
Future
will contain the IAcknowledgement
message. If the
message is not an IRequest
, the Future
will contain null
ObjectDataRequest
followed by the
ObjectCommandRequest
to commit the new data. While the underlying
communications will ensure in order delivery, that delivery is dependent
not upon the order of send commands, rather the order in which the messages
are transformed to a sendable representation (i.e. stream of bytes). This
is not usually an issue unless you send the data request on one thread and
the command request on another. Since the encoding of the data will
typically take longer, the command may arrive before the data. If you use
this model, you should probably wait for the acknowledgment of the data
transmission before sending the command.message
- IClock getClock()
ISensorObjectManager getSensorObjectManager()
IAfferentObjectManager getAfferentObjectManager()
IEfferentObjectManager getEfferentObjectManager()
IAgentObjectManager getAgentObjectManager()
IRealObjectManager getRealObjectManager()
IEfferentCommandManager getEfferentCommandManager()
INotificationManager getNotificationManager()