|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(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(String reason)
Cancel the event, giving a reason why. |
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 |
---|
equals, getEventFilter, hashCode, matches |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, 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(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 eventsMethod Detail |
---|
public boolean isCanceled()
CancelableEvent
isCanceled
in interface CancelableEvent
public void cancel()
CancelableEvent
cancel
in interface CancelableEvent
public void cancel(String reason)
CancelableEvent
cancel
in interface CancelableEvent
reason
- the reason why the event was canceledpublic String getReason()
CancelableEvent
getReason
in interface CancelableEvent
CancelableEvent.cancel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |