be.SIRAPRISE.messages
Class CommitRollbackMessageType

java.lang.Object
  extended by be.SIRAPRISE.messages.ServerMessageType
      extended by be.SIRAPRISE.messages.ServerInputMessageType
          extended by be.SIRAPRISE.messages.CommitRollbackMessageType
Direct Known Subclasses:
CommitRollbackMessageTypeV1_0, CommitRollbackMessageTypeV1_1

public abstract class CommitRollbackMessageType
extends ServerInputMessageType

The CommitRollbackMessageType is the type of message to be sent by clients when they want the server they're connected to to commit or rollback a (sub)transaction they started. SIRA_PRISE 1.2 introduced the TRANSACTIONID field in this message type. The default assumed by 1.2 servers when getting this message from 1.1 clients is "the current transaction" (which is the only one such clients have the opportunity to start).

Author:
Erwin Smout

Field Summary
static int MESSAGETYPEID
          Comment for MESSAGETYPEID
 
Method Summary
 CommitRollbackMessage message(boolean commit)
          Deprecated. replace with the factory method that includes the identification of the transaction to commit or roll back
abstract  CommitRollbackMessage message(boolean commit, long transactionID)
          Gets a CommitRollbackMessage holding the request to either commit or roll back the transaction with the given ID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGETYPEID

public static final int MESSAGETYPEID
Comment for MESSAGETYPEID

See Also:
Constant Field Values
Method Detail

message

public final CommitRollbackMessage message(boolean commit)
Deprecated. replace with the factory method that includes the identification of the transaction to commit or roll back

Gets a CommitRollbackMessage holding the request to either commit or roll back the current transaction

Parameters:
commit - true if a commit is requested, false if a rollback is requested
Returns:
a CommitRollbackMessage holding the request to either commit or roll back the current transaction

message

public abstract CommitRollbackMessage message(boolean commit,
                                              long transactionID)
Gets a CommitRollbackMessage holding the request to either commit or roll back the transaction with the given ID

Parameters:
commit - true if a commit is requested, false if a rollback is requested
transactionID - The server-side ID of the transaction that requests to be committed or rolled back. Negative values indicate "the current transaction".
Returns:
a CommitRollbackMessage holding the request to either commit or roll back the current transaction