org.opengroup.arm40.transaction.ArmInterface Interface Reference

The root of the inheritance hierarchy for almost all ARM interfaces. More...

Inheritance diagram for org.opengroup.arm40.transaction.ArmInterface:
org.opengroup.arm40.metric.ArmMetric org.opengroup.arm40.metric.ArmMetricDefinition org.opengroup.arm40.metric.ArmMetricFactory org.opengroup.arm40.metric.ArmMetricGroup org.opengroup.arm40.metric.ArmMetricGroupDefinition org.opengroup.arm40.tranreport.ArmTranReport org.opengroup.arm40.tranreport.ArmTranReportFactory org.opengroup.arm40.transaction.ArmApplication org.opengroup.arm40.transaction.ArmApplicationDefinition org.opengroup.arm40.transaction.ArmBlockCause org.opengroup.arm40.transaction.ArmIdentityProperties org.opengroup.arm40.transaction.ArmToken org.opengroup.arm40.transaction.ArmTransaction org.opengroup.arm40.transaction.ArmTransactionDefinition org.opengroup.arm40.transaction.ArmTransactionFactory org.opengroup.arm40.transaction.ArmUser

List of all members.

Public Member Functions

int getErrorCode ()
int setErrorCode (int errorCode)
String getErrorMessage (int errorCode)

Detailed Description

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. 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. If the object does not support the function or does not recognize the error code, it returns null.

ARM Working Group of The Open Group

Member Function Documentation

int org.opengroup.arm40.transaction.ArmInterface.getErrorCode (  ) 
last error code set for this object as a negative value. Zero, if no error code is set.
String org.opengroup.arm40.transaction.ArmInterface.getErrorMessage ( int  errorCode  ) 
errorCode an error code retrieved from this object.
a string describing the error for errorCode, or null.
int org.opengroup.arm40.transaction.ArmInterface.setErrorCode ( int  errorCode  ) 
errorCode the error code to be set for this object.
the error code provided in errorCode.

The documentation for this interface was generated from the following file:
  • org/opengroup/arm40/transaction/