public interface OperationResult
OperationResult
interface defines the structure for operation results
generated by device implementations in the com.cloudpos package. These results
notify applications about the completion and outcomes of requested operations.
OperationResult
serves as a template for all operation event results.
Each specific service package should derive an interface from OperationResult
,
adding methods to access data relevant to that specific device and result type.
The getResultCode
method allows applications to retrieve the result
of an operation. Defined values in OperationResult
for this purpose include:
NONE
: No operation is pending. Used as an initialization value for pre-created events.
SUCCESS
: The operation completed successfully.
CANCEL
: The operation was externally cancelled and not completed.
ERR_GENERAL_ERROR
: A catastrophic error occurred during an operation,
representing the highest-priority error.
ERR_NO_PERMISSION
: The operation is not available, possibly due to
lack of necessary permissions or because it is not supported by the platform
* implementation.
ERR_NO_INFO
: Used when no specific information is available for an error.
This code should be set if the error cause does not match any documented descriptions.
ERR_TIMEOUT
: The error resulted from a timeout expiration.
ERR_DEVICE_BASE
: The start value of device error.
ERR_DEVICE_BASE
.Modifier and Type | Field and Description |
---|---|
static int |
CANCEL |
static int |
ERR_DEVICE_BASE |
static int |
ERR_GENERAL_ERROR |
static int |
ERR_NO_INFO |
static int |
ERR_NO_PERMISSION |
static int |
ERR_TIMEOUT |
static int |
NONE |
static int |
SUCCESS |
Modifier and Type | Method and Description |
---|---|
int |
getResultCode()
Retrieves the result code of an operation.
|
static final int NONE
static final int SUCCESS
static final int CANCEL
static final int ERR_GENERAL_ERROR
static final int ERR_NO_PERMISSION
static final int ERR_NO_INFO
static final int ERR_TIMEOUT
static final int ERR_DEVICE_BASE