public interface IAsciiCommandExecuting
Modifier and Type | Method and Description |
---|---|
void |
addResponder(IAsciiCommandResponder responder)
Add a responder to the responder chain
|
void |
addSynchronousResponder()
Add the synchronous responder into the chain
This is a special responder that despatches responses through a command’s synchronousCommandResponder property
There will only ever be one of these in the command chain
|
void |
clearResponders()
Clear all responders from the responder chain
|
void |
executeCommand(IAsciiCommand command)
Execute the given command.
|
java.lang.Iterable<IAsciiCommandResponder> |
getResponderChain()
Gets the chain of TSLAsciiCommandResponders
|
void |
removeResponder(IAsciiCommandResponder responder)
Remove a responder from the responder chain
|
void |
removeSynchronousResponder()
Remove the synchronous responder from the chain
|
java.lang.Iterable<IAsciiCommandResponder> getResponderChain()
void addResponder(IAsciiCommandResponder responder)
responder
- The responder to add to the chainvoid addSynchronousResponder()
void clearResponders()
void executeCommand(IAsciiCommand command)
command
- The command to be executed
Command execution is asynchronous unless the command has a (non-nil) synchronousCommandResponder then
the command will be executed synchronously. Synchronous behaviour requires prior call to addSynchronousResponder.
Warning: derived classes must call the base implementation to ensure synchronous commands work correctlyvoid removeResponder(IAsciiCommandResponder responder)
responder
- The responder to remove from the chainvoid removeSynchronousResponder()