Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.icatch.msg
Interface TransactionMessage

All Known Subinterfaces:
  CommitMessage, ErrorMessage, ForgetMessage, PreparedMessage, PrepareMessage, RegisteredMessage, RegisterMessage, ReplayMessage, RollbackMessage, StateMessage

All Known Implementing Classes:
  AbstractMessage, CommitMessageImp, ErrorMessageImp, ForgetMessageImp, PreparedMessageImp, PrepareMessageImp, RegisteredMessageImp, RegisterMessageImp, ReplayMessageImp, RollbackMessageImp, StateMessageImp

    public interface TransactionMessage

A TransactionMessage is a generic type for two-phase commit related messages exchanged in a loosely-coupled environment.

Field Summary
`static int` | `COMMIT_MESSAGE` Constant indicating a commit message.
`static int` | `ERROR_MESSAGE` Constant indicating an error message.
`static int` | `FORGET_MESSAGE` Constant indicating a forget message.
`static int` | `FORMAT_SOAP` Constant indicating that the message SOAP formatted.
`static int` | `FORMAT_UNKNOWN` Constant indicating that the message is in unknown format.
`static int` | `PREPARE_MESSAGE` Constant indicating a prepare message.
`static int` | `PREPARED_MESSAGE` Constant indicating a prepared message.
`static int` | `REGISTER_MESSAGE` Constant indicating a registration message.
`static int` | `REGISTERED_MESSAGE` Constant indicating a registration response message.
`static int` | `REPLAY_MESSAGE` Constant indicating a replay message.
`static int` | `ROLLBACK_MESSAGE` Constant indicating a rollback message.
`static int` | `STATE_MESSAGE` Constant indicating a state message.

Method Summary
`int` | `getFormat()` Get the format identifier.
`int` | `getMessageType()` Get the message type.
`int` | `getProtocol()` Get the protocol identifier.
`Object` | `getSenderAddress()` Get the sender address for the message.
`String` | `getSenderURI()` Get the sender URI for the message.
`Object` | `getTargetAddress()` Get the destination address of the message.
`String` | `getTargetURI()` Get the URI of the target object of the message.

Field Detail

### FORMAT_SOAP

    static final int FORMAT_SOAP

  Constant indicating that the message SOAP formatted.

  See Also:
    Constant Field Values

### FORMAT_UNKNOWN

    static final int FORMAT_UNKNOWN

  Constant indicating that the message is in unknown format.

  See Also:
    Constant Field Values

### COMMIT_MESSAGE

    static final int COMMIT_MESSAGE

  Constant indicating a commit message.

  See Also:
    Constant Field Values

### ERROR_MESSAGE

    static final int ERROR_MESSAGE

  Constant indicating an error message.

  See Also:
    Constant Field Values

### FORGET_MESSAGE

    static final int FORGET_MESSAGE

  Constant indicating a forget message.

  See Also:
    Constant Field Values

### PREPARE_MESSAGE

    static final int PREPARE_MESSAGE

  Constant indicating a prepare message.

  See Also:
    Constant Field Values

### PREPARED_MESSAGE

    static final int PREPARED_MESSAGE

  Constant indicating a prepared message.

  See Also:
    Constant Field Values

### REPLAY_MESSAGE

    static final int REPLAY_MESSAGE

  Constant indicating a replay message.

  See Also:
    Constant Field Values

### ROLLBACK_MESSAGE

    static final int ROLLBACK_MESSAGE

  Constant indicating a rollback message.

  See Also:
    Constant Field Values

### STATE_MESSAGE

    static final int STATE_MESSAGE

  Constant indicating a state message.

  See Also:
    Constant Field Values

### REGISTER_MESSAGE

    static final int REGISTER_MESSAGE

  Constant indicating a registration message.

  See Also:
    Constant Field Values

### REGISTERED_MESSAGE

    static final int REGISTERED_MESSAGE

  Constant indicating a registration response message.

  See Also:
    Constant Field Values

Method Detail

### getProtocol

    int getProtocol()

  Get the protocol identifier.

  Returns:
    int One of the CommitProtocol values.

### getFormat

    int getFormat()

  Get the format identifier.

  Returns:
    int One of the FORMAT_* values.

### getTargetAddress

    Object getTargetAddress()

  Get the destination address of the message. The target address is opaque to the messaging package; its concrete content is only known by the protocol-specific wire-level code. The messaging package calls this method when processing a registration message: whereas the senderAddress indicates where to reply to, the targetAddress is expected to be the contact address information (to be used by two-phase commit) for reaching the remote participant that is registering.

  Returns:
    Object The destination address.

### getTargetURI

    String getTargetURI()

  Get the URI of the target object of the message. This value is closely related to the senderURI.

  Returns:
    String The globally unique target object URI.

### getSenderAddress

    Object getSenderAddress()

  Get the sender address for the message. The sender address is opaque to the messaging package; its concrete content is only known by the protocol-specific wire-level code. The messaging code ensures, however, that all reply messages (created for incoming two-phase request messages) have a targetAddress corresponding to the senderAddress of the request.

  Returns:
    The sender address.

### getSenderURI

    String getSenderURI()

  Get the sender URI for the message. The senderURI is assumed to uniquely identify the sending transaction object for a request or reply message. The senderURI is related to the targetURI in the 2-phase commit conversations:
  - For outgoing 2PC requests, senderURI and targetURI are the same and correspond to the URI of the remote participant.
  - For incoming 2PC replies, the targetURI should be the same as the senderURI of the original request, or the messaging code in this package will not work.
  - For incoming 2PC requests, the targetURI should be the URI of a local participant. The senderURI is opaque and used only for setting the right correlation info as the targetURI of the reply.
  - For outgoing 2PC replies (including registration confirmation), the senderURI corresponds to the original targetURI found in the incoming request message and the targetURI is the senderURI of the incoming request message.
  - For outgoing replay requests, the senderURI is the URI of the local participant requesting the replay.
  - For incoming registration requests, the senderURI represents the remote participant's URI to use in this transaction service when sending commit requests.
  - For outgoing registration requests, the senderURI is an URI combined of the local participant plus the URL of the local registration requesting port.

  Returns:
    String The globally unique sender URI.

### getMessageType

    int getMessageType()

  Get the message type.

  Returns:
    int One of the predefined types.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.