org.opengroup.arm40.transaction
Interface ArmInterface
- All Known Subinterfaces:
- ArmApplication, ArmApplicationDefinition, ArmApplicationRemote, ArmCorrelator, ArmID, ArmIdentityProperties, ArmIdentityPropertiesTransaction, ArmMetric, ArmMetricCounter32, ArmMetricCounter32Definition, ArmMetricCounter64, ArmMetricCounter64Definition, ArmMetricCounterFloat32, ArmMetricCounterFloat32Definition, ArmMetricDefinition, ArmMetricFactory, ArmMetricGauge32, ArmMetricGauge32Definition, ArmMetricGauge64, ArmMetricGauge64Definition, ArmMetricGaugeFloat32, ArmMetricGaugeFloat32Definition, ArmMetricGroup, ArmMetricGroupDefinition, ArmMetricNumericId32, ArmMetricNumericId32Definition, ArmMetricNumericId64, ArmMetricNumericId64Definition, ArmMetricString32, ArmMetricString32Definition, ArmSystemAddress, ArmToken, ArmTranReport, ArmTranReportFactory, ArmTranReportWithMetrics, ArmTransaction, ArmTransactionDefinition, ArmTransactionFactory, ArmTransactionWithMetrics, ArmTransactionWithMetricsDefinition, ArmUser
- All Known Implementing Classes:
- ArmApplication, ArmApplicationDefinition, ArmApplicationRemote, ArmCorrelator, ArmFactory, ArmID, ArmIdentityProperties, ArmIdentityPropertiesTransaction, ArmInterface, ArmMetric, ArmMetricCounter32, ArmMetricCounter32Definition, ArmMetricCounter64, ArmMetricCounter64Definition, ArmMetricCounterFloat32, ArmMetricCounterFloat32Definition, ArmMetricDefinition, ArmMetricFactory, ArmMetricGauge32, ArmMetricGauge32Definition, ArmMetricGauge64, ArmMetricGauge64Definition, ArmMetricGaugeFloat32, ArmMetricGaugeFloat32Definition, ArmMetricGroup, ArmMetricGroupDefinition, ArmMetricNumericId32, ArmMetricNumericId32Definition, ArmMetricNumericId64, ArmMetricNumericId64Definition, ArmMetricString32, ArmMetricString32Definition, ArmSystemAddress, ArmToken, ArmTranReport, ArmTranReportFactory, ArmTranReportWithMetrics, ArmTransaction, ArmTransactionDefinition, ArmTransactionFactory, ArmTransactionWithMetrics, ArmTransactionWithMetricsDefinition, ArmUser
public interface ArmInterface
The root of the inheritance hierarchy for almost all ARM interfaces.
It provides a common way to handle errors. If a method invocation on any
ARM object causes an error, the error code returned by the object's
getErrorCode()
will be negative. If no error occurs, the error
code is zero. Several methods also return the error code as an
int
return value. If an error occurs in a factory method
(e.g., a method in ArmTransactionFactory
), the error code
is set in both the factory object and the newly created object. The
implementation of the object has sole discretion as to whether a method
results in an error.
The error code may change any time a method of the object is executed.
Executing a method overrides the previous error code value. The only
methods that will never change the error code are
getErrorCode()
and getErrorMessage()
.
If multiple threads are processing the same object simultaneously, the
results are unpredictable. An error code set as a result of an operation
in method X could be replaced by an operation in method Y before
thread X executes getErrorCode()
.
The error code can also be set with setErrorCode(int)
. This is a way
for the application to reset or change the error code. It would most
typically be used in a callback registered with the ARM implementation's
factory objects used to create ARM objects on behalf of the application.
In this way the application can implement a central error handling
policy in the callback. A value set with setErrorCode()
in a callback overwrites the previous value (i.e., the value that caused
the callback to be made).
For any non-zero error code returned by an object, the application can
request from the same object a string message describing the error
using getErrorMessage(int)
. If the object does not support the
function or does not recognize the error code, it returns
null
.
- Author:
- ARM Working Group of The Open Group
getErrorCode
int getErrorCode()
- Returns:
- last error code set for this object as a negative value.
Zero, if no error code is set.
setErrorCode
int setErrorCode(int errorCode)
- Parameters:
errorCode
- the error code to be set for this object.
- Returns:
- the error code provided in
errorCode
.
getErrorMessage
java.lang.String getErrorMessage(int errorCode)
- Parameters:
errorCode
- an error code retrieved from this object.
- Returns:
- a string describing the error for
errorCode
,
or null
.