|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.observation.event.AbstractFilterableEvent
org.xwiki.observation.event.AbstractCancelableEvent
public abstract class AbstractCancelableEvent
Abstract base class for cancelable events.
| Constructor Summary | |
|---|---|
protected |
AbstractCancelableEvent()
Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any
other event of the same type. |
protected |
AbstractCancelableEvent(EventFilter eventFilter)
Constructor using a custom EventFilter. |
protected |
AbstractCancelableEvent(java.lang.String name)
Constructor initializing the event filter with a FixedNameEventFilter,
meaning that this event will match only events of the same type affecting the same passed name. |
| Method Summary | |
|---|---|
void |
cancel()
Cancel the event. |
void |
cancel(java.lang.String reason)
Cancel the event, giving a reason why. |
java.lang.String |
getReason()
Get the reason why the event was canceled. |
boolean |
isCanceled()
Check if this event was canceled by one of the receivers. |
| Methods inherited from class org.xwiki.observation.event.AbstractFilterableEvent |
|---|
getEventFilter, matches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xwiki.observation.event.Event |
|---|
matches |
| Constructor Detail |
|---|
protected AbstractCancelableEvent()
AlwaysMatchingEventFilter, meaning that this event will match any
other event of the same type.
protected AbstractCancelableEvent(java.lang.String name)
FixedNameEventFilter,
meaning that this event will match only events of the same type affecting the same passed name.
name - a generic name that uniquely identifies an event typeprotected AbstractCancelableEvent(EventFilter eventFilter)
EventFilter.
eventFilter - the filter to use for matching events| Method Detail |
|---|
public boolean isCanceled()
isCanceled in interface CancelableEventCancelableEvent.isCanceled()public void cancel()
cancel in interface CancelableEventCancelableEvent.cancel()public void cancel(java.lang.String reason)
cancel in interface CancelableEventreason - the reason why the event was canceledCancelableEvent.cancel(java.lang.String)public java.lang.String getReason()
getReason in interface CancelableEventCancelableEvent.cancel()CancelableEvent.getReason()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||