com.atomikos.icatch.msg
Class ErrorMessageImp

java.lang.Object
  extended by com.atomikos.icatch.msg.AbstractMessage
      extended by com.atomikos.icatch.msg.ErrorMessageImp
All Implemented Interfaces:
ErrorMessage, TransactionMessage

public class ErrorMessageImp
extends AbstractMessage
implements ErrorMessage

A reusable implementation of an error message.


Field Summary
 
Fields inherited from interface com.atomikos.icatch.msg.ErrorMessage
HEUR_COMMIT_ERROR, HEUR_HAZARD_ERROR, HEUR_MIXED_ERROR, HEUR_ROLLBACK_ERROR, HEURISTIC_MAX, HEURISTIC_MIN, ROLLBACK_ERROR, UNKNOWN_ERROR
 
Fields inherited from interface com.atomikos.icatch.msg.TransactionMessage
COMMIT_MESSAGE, ERROR_MESSAGE, FORGET_MESSAGE, FORMAT_SOAP, FORMAT_UNKNOWN, PREPARE_MESSAGE, PREPARED_MESSAGE, REGISTER_MESSAGE, REGISTERED_MESSAGE, REPLAY_MESSAGE, ROLLBACK_MESSAGE, STATE_MESSAGE
 
Constructor Summary
ErrorMessageImp(int protocol, int format, Object targetAddress, String targetURI, Object senderAddress, String senderURI, int code)
          Create a new instance.
 
Method Summary
 int getErrorCode()
          Get the error code.
 int getMessageType()
          Get the message type.
 
Methods inherited from class com.atomikos.icatch.msg.AbstractMessage
getFormat, getProtocol, getSenderAddress, getSenderURI, getTargetAddress, getTargetURI, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atomikos.icatch.msg.TransactionMessage
getFormat, getProtocol, getSenderAddress, getSenderURI, getTargetAddress, getTargetURI
 

Constructor Detail

ErrorMessageImp

public ErrorMessageImp(int protocol,
                       int format,
                       Object targetAddress,
                       String targetURI,
                       Object senderAddress,
                       String senderURI,
                       int code)
Create a new instance.

Parameters:
protocol - The commit protocol.
format - The format of the message.
targetAddress - Where to send it.
targetURI - For which target object this is.
senderAddress - Who is sending this.
senderURI - Which object is sending this.
code - The error code.
Method Detail

getErrorCode

public int getErrorCode()
Description copied from interface: ErrorMessage
Get the error code.

Specified by:
getErrorCode in interface ErrorMessage
Returns:
int One of the predefined error constants.
See Also:
ErrorMessage

getMessageType

public int getMessageType()
Description copied from interface: TransactionMessage
Get the message type.

Specified by:
getMessageType in interface TransactionMessage
Returns:
int One of the predefined types.
See Also:
TransactionMessage


Copyright © 2012. All Rights Reserved.