com.ibm.wbi
Class Transaction

java.lang.Object
  |
  +--com.ibm.wbi.Transaction

public class Transaction
extends java.lang.Object


Field Summary
protected  AbortEvent abortEvent
          The AbortEvent that caused this transaction to be aborted.
protected  java.util.Vector abortListeners
          The list of AbortListeners that should be notified in case of an abort.
protected  java.lang.String id
          A unique identifier for the transaction.
protected  com.ibm.wbi.sublayer.Sublayer sublayer
          The Sublayer that launched the transaction.
protected  java.lang.Integer sublayerIdentity
          The Sublayer identity that launched the transaction.
 
Constructor Summary
Transaction(com.ibm.wbi.sublayer.Sublayer sublayer, java.lang.Integer sublayerIdentity, java.lang.String id)
          Constructor that takes arguments for unchangeable properties of the TransactionInfo object.
 
Method Summary
 void abort(AbortEvent abortEvent)
          Signal that the transaction should be aborted and all registered AbortListeners should be notified.
 void addAbortListener(AbortListener abortListener)
          Add an AbortListener to the list of objects to be notified in case of an abort.
 AbortEvent getAbortEvent()
          Determine the event that caused this transaction to be aborted.
 java.lang.String getId()
          Access the unique identifier for the transaction
 com.ibm.wbi.sublayer.Sublayer getSublayer()
          Access the Sublayer that launched the transaction.
 java.lang.Integer getSublayerIdentity()
          Access the Sublayer identity that launched the transaction.
 boolean isAborted()
          Determine if this transaction has been aborted or not.
 void removeAbortListener(AbortListener abortListener)
          Remove an AbortListener from the list of objects to be notified in case of an abort.
 void removeAllAbortListeners()
          Remove all of the AbortListeners from the list of objects to be notified in case of an abort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sublayer

protected com.ibm.wbi.sublayer.Sublayer sublayer
The Sublayer that launched the transaction.

sublayerIdentity

protected java.lang.Integer sublayerIdentity
The Sublayer identity that launched the transaction.

id

protected java.lang.String id
A unique identifier for the transaction.

abortListeners

protected java.util.Vector abortListeners
The list of AbortListeners that should be notified in case of an abort.

abortEvent

protected AbortEvent abortEvent
The AbortEvent that caused this transaction to be aborted. If null, the transaction has not been aborted.
Constructor Detail

Transaction

public Transaction(com.ibm.wbi.sublayer.Sublayer sublayer,
                   java.lang.Integer sublayerIdentity,
                   java.lang.String id)
Constructor that takes arguments for unchangeable properties of the TransactionInfo object.
Parameters:
sublayer - The Sublayer that launched the transaction.
sublayerIdentity - The identity of the Sublayer that launched the transaction.
id - The Sublayer-assigned unique ID for the transaction. The globally unique ID will be constructed from this ID, the Sublayer and the Sublayer identity.
Method Detail

getSublayer

public com.ibm.wbi.sublayer.Sublayer getSublayer()
Access the Sublayer that launched the transaction.

getSublayerIdentity

public java.lang.Integer getSublayerIdentity()
Access the Sublayer identity that launched the transaction.

getId

public java.lang.String getId()
Access the unique identifier for the transaction

abort

public void abort(AbortEvent abortEvent)
Signal that the transaction should be aborted and all registered AbortListeners should be notified.
Parameters:
abortEvent - The event that caused the transaction to be aborted.

isAborted

public boolean isAborted()
Determine if this transaction has been aborted or not.
Returns:
True if the transaction has been aborted, otherwise false.

getAbortEvent

public AbortEvent getAbortEvent()
Determine the event that caused this transaction to be aborted.
Returns:
The event that caused this transaction to be aborted, or null if the transaction has not been aborted.

addAbortListener

public void addAbortListener(AbortListener abortListener)
Add an AbortListener to the list of objects to be notified in case of an abort.
Parameters:
abortListener - The object to be notified in case of an abort.

removeAbortListener

public void removeAbortListener(AbortListener abortListener)
Remove an AbortListener from the list of objects to be notified in case of an abort.
Parameters:
abortListener - The object to be removed from the list.

removeAllAbortListeners

public void removeAllAbortListeners()
Remove all of the AbortListeners from the list of objects to be notified in case of an abort.