Interface Cancelable
- All Known Implementing Classes:
ModulePreLoadEvent,ModulePreReloadEvent,ModulePreStartEvent,ModulePreStopEvent,NetworkChannelInitEvent
public interface Cancelable
This class represents an event which is cancelable. All events which can be prevented from execution should implement
this interface. If an event is forced to execute, for example a post-processing event which has just notification
purposes, should not implement this interface nor expose any method to prevent the execution of the event in any
other way.
- Since:
- 4.0
-
Method Summary
-
Method Details
-
cancelled
boolean cancelled()Gets the cancellation state of the event. A cancelled event will stop the execution of the representing change in the system, but will be passed to all event listeners nevertheless.- Returns:
- true if this is cancelled, false otherwise.
-
cancelled
void cancelled(boolean value) Marks this event as cancelled and stops the execution of the representing change in the system. The event will be passed to other event listeners down the line anyway.- Parameters:
value- true if this event should get marked as cancelled, false otherwise.
-