public interface AsyncResult
| Modifier and Type | Method and Description |
|---|---|
void |
error(java.lang.Throwable error)
Sets the method execution is finished with error(s).
|
java.lang.String |
getId()
Unique identification of this
AsyncResult object. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns custom properties assigned to this method execution represented by this
AsyncResult object. |
void |
notReadyToExecute()
Notifies the system that this method cannot be currently executed.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties,
boolean append)
Sets custom properties assigned to this method execution represented by this
AsyncResult object. |
void |
success(java.lang.Object result)
Sets the method execution as successfully complete and provides the execution result
value if any.
|
void |
warning(java.lang.String warningMessage)
Sets the method execution is finished with warning(s).
|
java.lang.String getId()
AsyncResult object.AsyncResult object.void success(java.lang.Object result)
DeviceExecItem monitored on the front-end
to be set in state DeviceExecItem.State.FINISHED_SUCCESS.result - execution result value.void warning(java.lang.String warningMessage)
DeviceExecItem monitored on the front-end
to be set in state DeviceExecItem.State.FINISHED_WARNING.warningMessage - the warning message explaining what
was possibly not OK during the method execution.void error(java.lang.Throwable error)
DeviceExecItem monitored on the front-end
to be set in state DeviceExecItem.State.FINISHED_ERROR.error - the execution error.void notReadyToExecute()
DeviceExecItem monitored on the front-end
to be set in state DeviceExecItem.State.RUNNING_NOT_READY_TO_EXECUTE, thus informing the user to not for the execution
since it is not really started.java.util.Map<java.lang.String,java.lang.Object> getProperties()
AsyncResult object.
These properties can be assigned:
on the backend, by the setProperties(Map, boolean) method, or
on the front end - via DeviceExecItem.setProperty(String, Object)
and DeviceExecItem.setProperties(Map, boolean) methods.void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties,
boolean append)
AsyncResult object.
These properties will also become viewable on the front-end, via the DeviceExecItem.getProperty(String)
and DeviceExecItem.getProperties() methods.properties - custom properties.append - if true the supplied properties will be appended/added to any properties currently existing for
this execution item, otherwise any existing properties will be fully replaced by the supplied ones.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.