public interface InterpretationResult
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR
ERROR mode denotes that the command is completely executed but finished
with error on the backend and nothing else should be executed
on the target device.
|
static int |
OFFLINE_INTERPRETATION
OFFLINE_INTERPRETATION mode indicates that command will be executed asynchronously
and may be confirmed in subsequent connection establishment sessions.
|
static int |
SUCCESS
SUCCESS mode denotes that the command is completely and successfully
executed on the backend and there is no need anything else to be executed
on the target device.
|
static int |
TO_PROCEED
TO_PROCEED mode denotes that the command is partially executed on the backend
and in addition another (or the same) command(s) should be sent to the target
device for execution.
|
static int |
WARNING
WARNING mode denotes that the command is completely executed but finished
with warning on the backend and nothing else should be executed
on the target device.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCommandId()
Returns a system generated command identifier of the command, which interpretation result
should be applied with this object.
|
java.util.Dictionary<java.lang.String,java.lang.Object> |
getCommandProperties() |
java.lang.Object |
getInterpretationContext()
Returns the interpretation context object currently set for the current chunk of commands under the same
interpretation group.
|
java.lang.String |
getOperationId()
Returns id of the operation, the command is executed within.
|
OperationInfo |
getOperationInfo()
Returns additional info for the operation being executed.
|
void |
resetOfflineInterpretationMode()
Reverts the command from being marked in offline interpretation mode.
|
void |
setCommandProperty(java.lang.String key,
java.lang.Object value) |
void |
setError(java.lang.String errorMessage)
Sets this InterpretationResult object in ERROR
mode and invalidates this InterpretationResult object.
|
void |
setExecutionStarted()
This method notifies the system that execution of that command shall be (or is) started, but
the result could be delayed indefinitely (for example when sending the command for interpretation to the client device).
|
void |
setInterpretationContext(java.lang.Object interpretationContext)
Sets interpretation context object for buffering the command jobs for the current chunk of commands
under the same interpretation group.
|
void |
setOfflineInterpretationMode()
Marks the command as being interpreted offline and may be confirmed in subsequent connection establishment sessions.
|
void |
setSuccess(java.lang.Object commandResult)
Sets this InterpretationResult object to in success mode and
invalidates this InterpretationResult object.
|
void |
setToProceed(Command command)
Sets this InterpretationResult object in TO_PROCEED
mode and invalidates this InterpretationResult object.
|
void |
setToProceedSync(Command command)
Sets this InterpretationResult object in TO_PROCEED
mode, causing the supplied commands to be interpreted in the same thread
setToProceedSync is invoked. |
void |
setWarning(java.lang.String errorMessage)
Sets this InterpretationResult object in WARNING
mode and invalidates this InterpretationResult object.
|
static final int SUCCESS
static final int WARNING
static final int ERROR
static final int TO_PROCEED
static final int OFFLINE_INTERPRETATION
OperationManagementContext.forcePendingCommands(String, String) to the system, since
the command is considered to be in process of interpretation (even though connection session may be lost),
and needs not to be forced again causing duplicate executions.
In fact, this mode marks the command to not be resent when calling OperationManagementContext.forcePendingCommands(String, String) to the system.java.lang.String getCommandId()
java.lang.String getOperationId()
void setSuccess(java.lang.Object commandResult)
commandResult - if the command execution is meant to return a result,
the interpreters can set it with this parameter. Any
CommandResultListener-s registered to listen for command results of
this kind will receive the object given in this parameter.java.lang.Exception - thrown if this InterpretationResult object
has been invalidated.CommandResultsListener.addingResult(String, String, String, String, int, Object),
CommandResultListener.addingResult(String, String, String, String, int, Object)void setToProceed(Command command)
command - a result command to proceed execution over the target device.void setToProceedSync(Command command)
setToProceedSync is invoked.command - a result command to proceed execution over the target device.void setOfflineInterpretationMode()
OperationManagementContext.forcePendingCommands(String, String) to the system, since
the command is considered to be in process of interpretation (even though connection session may be lost),
and needs not to be forced again causing duplicate executions.
In fact, this method marks the command to not be resent when calling OperationManagementContext.forcePendingCommands(String, String) to the system.void resetOfflineInterpretationMode()
setOfflineInterpretationMode(), and the command will start being
sent when calling OperationManagementContext.forcePendingCommands(String, String) to the system.void setWarning(java.lang.String errorMessage)
errorMessage - an error message denoting the failure reason.void setError(java.lang.String errorMessage)
errorMessage - an error message denoting the failure reason.void setExecutionStarted()
setExecutionStarted for the current command, the system fills it in the concurrent active jobs
pool. When confirmation of command is done (via the setSuccess, setWarning, setError or setToProceed) methods,
the current command will also leave the pool and will make a room for another command to be launched.void setInterpretationContext(java.lang.Object interpretationContext)
InterpretationGroupinterpretationContext - interpretation context object.java.lang.Object getInterpretationContext()
InterpretationGroupOperationInfo getOperationInfo()
OperationInfo object.java.util.Dictionary<java.lang.String,java.lang.Object> getCommandProperties()
void setCommandProperty(java.lang.String key,
java.lang.Object value)
Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.