org.arm4.arm40.transaction
Class ArmInterface
public
class
ArmInterface
extends Object
implements ArmInterface
ArmInterface implementation provides a common way to handle errors. If a
method invocation on any ARM object causes an error, the error code returned
by the objects 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 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.
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.
Version: $Revision$ $Date$
Author: dcarter
protected int m_errorCode
public int getErrorCode()
public String getErrorMessage(int errorCode)
Return the Arm Factory that created this ARM Object.
Returns: the the Arm Factory that created this ARM Object. If
NULL
is returned, then this object is a factory
itself.
public int setErrorCode(int errorCode)
Set the Arm Factory that created this ARM Object.
Parameters: factory
the Arm Factory that created this ARM Object.