de.qfs.lib.transaction
Class CommitableNotify
java.lang.Object
|
+--de.qfs.lib.transaction.CommitableNotify
- All Implemented Interfaces:
- Commitable
- public class CommitableNotify
- extends java.lang.Object
- implements Commitable
A CommitableNotify delays the notification of an Observable's Observer to the time of commit.
- Since:
- 0.97.0
- Version:
- $Revision: 1.5 $
- Author:
- Gregor Schmid
|
Field Summary |
protected java.lang.Object |
arg
The argument for the notifyObservers call. |
protected java.util.Observable |
observable
The Observable that should notify its Observers. |
|
Constructor Summary |
CommitableNotify(java.util.Observable observable)
Create a new CommitableNotify. |
CommitableNotify(java.util.Observable observable,
java.lang.Object arg)
Create a new CommitableNotify. |
|
Method Summary |
void |
commit()
Call the java.util.Observable.notifyObservers on the Observable. |
void |
rollback()
This is a noop, since nothing has happened yet. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
observable
protected java.util.Observable observable
- The Observable that should notify its
Observers.
arg
protected java.lang.Object arg
- The argument for the
notifyObservers call.
CommitableNotify
public CommitableNotify(java.util.Observable observable)
- Create a new CommitableNotify.
- Parameters:
observable - The Observable that should notify its
Observers.
CommitableNotify
public CommitableNotify(java.util.Observable observable,
java.lang.Object arg)
- Create a new CommitableNotify.
- Parameters:
observable - The Observable that should notify its
Observers.arg - The argument for the
notifyObservers call.
commit
public void commit()
- Call the
java.util.Observable.notifyObservers on the Observable.
- Specified by:
commit in interface Commitable
- Following copied from interface:
de.qfs.lib.transaction.Commitable
- Throws:
FatalTransactionException - If something fails in a way
that makes completion of commit impossible.
rollback
public void rollback()
- This is a noop, since nothing has happened yet.
- Specified by:
rollback in interface Commitable
- Following copied from interface:
de.qfs.lib.transaction.Commitable
- Throws:
FatalTransactionException - If something fails in a way
that makes completion of rollback impossible.