C - public abstract class SALReceivedCommand<C extends SALCommand> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
SALReceivedCommand(int cmdId,
C command) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
acknowledgeCommand(Duration timeToComplete)
(optionally) called by the receiver of the command to acknowledge the
command was received and accepted.
|
int |
getCmdId()
Get the command id of the received command
|
C |
getCommand()
Get the actual command received,
|
abstract void |
rejectCommand(String reason)
Called by the receiver of the command to indicate that the command was
rejected.
|
abstract void |
reportComplete()
Called by the receiver of the command to indicate the command has been
completed successfully.
|
abstract void |
reportError(Exception ex)
Called by the receiver to indicate that the command execution failed.
|
protected SALReceivedCommand(int cmdId,
C command)
public abstract void acknowledgeCommand(Duration timeToComplete) throws SALException
timeToComplete - The estimated time for completion of the command.SALException - If a communication exception occurs.public abstract void reportComplete()
throws SALException
SALException - If a communication exception occurs.public abstract void reportError(Exception ex) throws SALException
ex - The exception containing the reason for failure.SALException - If a communication exception occurs.public abstract void rejectCommand(String reason) throws SALException
reason - The reason for rejection.SALException - If a communication exception occurs.public int getCmdId()
public C getCommand()
Copyright © 2018. All rights reserved.