public class ConcurrentMessagingUtils extends Object
| Constructor and Description |
|---|
ConcurrentMessagingUtils(AgentMessagingLayer agentMessagingLayer) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAckForCommand(CommandRequest command,
long millisTimeout)
Send a CommandRequest on the buses and synchronously wait for the Ack to
come back.
|
Future<Object> |
sendAsynchronousCommand(CommandRequest command)
Send a command on the buses and immediately return a Future that will
asynchronously listen for the command reply.
|
Object |
sendSynchronousCommand(CommandRequest command,
long millisTimeout)
Send a command on the Buses and wait for the reply.
|
Future<StatusMessage> |
startListeningForStatusBusMessage(BusMessageFilter filter)
Get a Future on a StatusBusMessage.
|
Future<StatusMessage> |
startListeningForStatusBusMessage(BusMessageFilter filter,
long timeout)
Get a Future on a StatusBusMessage.
|
public ConcurrentMessagingUtils(AgentMessagingLayer agentMessagingLayer)
public Object sendSynchronousCommand(CommandRequest command, long millisTimeout) throws Exception
command - The CommandRequest object to be sent on the buses.millisTimeout - Timeout in milliseconds. If the reply is not received within
the timeout a TimeoutException will be thrown.Exception - If an exception was fired by the remote execution of the
command or the timeout expired.public Future<Object> sendAsynchronousCommand(CommandRequest command)
command - The CommandRequest object to be sent on the buses.public Object getAckForCommand(CommandRequest command, long millisTimeout) throws Exception
command - The CommandRequest object to be sent on the buses.millisTimeout - Timeout in milliseconds. If the ack is not received within the
timeout a TimeoutException will be thrown.Exception - If an exception was fired by the remote execution of the
command or the timeout expired.public Future<StatusMessage> startListeningForStatusBusMessage(BusMessageFilter filter, long timeout)
filter - ScriptingStatusBusMessageFilter The message filtertimeout - Timeout in milliseconds, after which a
ScriptiongTimeoutException is thrown. This timeout is from the
time the method is invoked. If this timeout is reached an
exception will be thrown if/when the Future is exercised.public Future<StatusMessage> startListeningForStatusBusMessage(BusMessageFilter filter)
filter - ScriptingStatusBusMessageFilter The message filterCopyright © 2015 LSST. All rights reserved.