|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--com.glaivestone.javax.util.ConfirmationEventObject
A ConfirmationEventObject
is used for
confirmation event notifications representing a proposal
which can be vetoed by a listener.
The specification of a confirmation event must define both the proposal represented by the event notification and the voting policy which determines whether the proposal is accepted if there are any vetos.. A typical voting policy for an action proposal is that any veto cancels the proposal. Other examples of voting policies include majority vote confirms the proposal, threshold count of number of listeners who must accept or reject the proposal, etc.
A confirmation event is vetoed by sending the veto
message.
The source object which fires a confirmation event is responsible
for handling VetoException
and providing an implementation
of the voting policy.
Confirmation events and the use of veto exceptions to implement voting policies on vetoable events is based on concepts from the Visual Smalltalk event system.
Constructor Summary | |
ConfirmationEventObject(java.lang.Object source)
Constructs a new veto-able ConfirmationEventObject . |
|
ConfirmationEventObject(java.lang.Object source,
boolean isVetoable)
Constructs a new ConfirmationEventObject . |
Method Summary | |
void |
veto()
Veto the proposed action. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConfirmationEventObject(java.lang.Object source)
ConfirmationEventObject
.
source
- The object on which the event initially occurred.public ConfirmationEventObject(java.lang.Object source, boolean isVetoable)
ConfirmationEventObject
.
source
- The object on which the event initially occurred.Method Detail |
public void veto() throws VetoException
This service is used by a listener to veto a confirmation event.
VetoException
- Veto the proposed action
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |