|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the messages that are sent when commiting (finishing)
or canceling from an FSMWizard
.
A commit operation is done as a two-phase commit. Each listener is asked if it can commit. Should any listener say that it is not ready to commit, no further listeners are asked and the commit is aborted. Once every listener has approved the commit, the listeners are called in order to perform the commit. Should any commit operation fail, the commit is aborted, and any commits already performed are rolled back. In this way, all the listeners commit or fail together.
Method Summary | |
void |
cancel(ApplyEvent event)
Called to cancel the FSMWizard . |
void |
checkCommit(ApplyEvent event)
Called to see if the listener is ready to commit. |
void |
commit(ApplyEvent event)
Called to have the listener perform the commit action. |
void |
rollback(ApplyEvent event)
Called to have the listener rollback the commit. |
Method Detail |
public void checkCommit(ApplyEvent event) throws TraversalException
checkCommit
will be called on every registered listener
as the first stage of the commit. If any listener vetoes the commit
by throwing a TraversalException
, the commit will be immediately
aborted. checkCommit
will not be called on any other listeners,
and no further actions will be taken.
event
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.
TraversalException
- if the commit should be aborted.public void commit(ApplyEvent event) throws TraversalException
commit
on any listeners, FSMWizard
will first
call checkCommit
on every listener.
If a listener wishes to abort the commit, a TraversalException
should be thrown. Aborting a commit will cause rollback
to be called on every listener, in reverse order, that already commited.
Note that rollback is not called on the listener that causes the commit
to be aborted.
event
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.
TraversalException
- if the commit should be aborted.public void rollback(ApplyEvent event)
event
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.public void cancel(ApplyEvent event)
FSMWizard
. Listeners should revert to the
initial state.
event
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.