public abstract class AbstractCancelableEvent extends AbstractFilterableEvent implements CancelableEvent
| Modifier | Constructor and Description |
|---|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
equals, getEventFilter, hashCode, matchesprotected 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 eventspublic boolean isCanceled()
CancelableEventisCanceled in interface CancelableEventpublic void cancel()
CancelableEventcancel in interface CancelableEventpublic void cancel(String reason)
CancelableEventcancel in interface CancelableEventreason - the reason why the event was canceledpublic String getReason()
CancelableEventgetReason in interface CancelableEventCancelableEvent.cancel()Copyright © 2004–2014 XWiki. All rights reserved.