org.apache.jackrabbit.core.state
Class TransactionContext

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.TransactionContext

public class TransactionContext
extends Object

Represents the transaction on behalf of the component that wants to explictely demarcate transcation boundaries.


Constructor Summary
TransactionContext()
           
 
Method Summary
 void addListener(TransactionListener listener)
          Add a transaction listener.
 Object getAttribute(String name)
          Return an attribute value on this transaction.
 void removeAttribute(String name)
          Remove an attribute on this transaction.
 void removeListener(TransactionListener listener)
          Remove a transaction listener previously added with addListener(org.apache.jackrabbit.core.state.TransactionListener)
 void setAttribute(String name, Object value)
          Set an attribute on this transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionContext

public TransactionContext()
Method Detail

setAttribute

public void setAttribute(String name,
                         Object value)
Set an attribute on this transaction. If the value specified is null, it is semantically equivalent to removeAttribute(java.lang.String).

Parameters:
name - attribute name
value - attribute value

getAttribute

public Object getAttribute(String name)
Return an attribute value on this transaction.

Parameters:
name - attribute name
Returns:
attribute value, null if no attribute with that name exists

removeAttribute

public void removeAttribute(String name)
Remove an attribute on this transaction.

Parameters:
name - attribute name

addListener

public void addListener(TransactionListener listener)
Add a transaction listener. This listener will be invoked when the transaction is either committed or rolled back.

Parameters:
listener - listener to add

removeListener

public void removeListener(TransactionListener listener)
Remove a transaction listener previously added with addListener(org.apache.jackrabbit.core.state.TransactionListener)

Parameters:
listener - listener to remove


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.