Class EventHandler
java.lang.Object
com.sk89q.worldedit.util.eventbus.EventHandler
- All Implemented Interfaces:
Comparable<EventHandler>
- Direct Known Subclasses:
MethodEventHandler,MethodHandleEventHandler
Event handler object for
EventBus that is able to dispatch
an event.
Original for Guava, licensed under the Apache License, Version 2.0.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventHandler(EventHandler.Priority priority) Create a new event handler. -
Method Summary
Modifier and TypeMethodDescriptionintabstract voidDispatch the event.abstract booleanGet the priority.final voidhandleEvent(Object event) Dispatch the given event.abstract inthashCode()toString()
-
Constructor Details
-
EventHandler
Create a new event handler.- Parameters:
priority- the priority
-
-
Method Details
-
getPriority
Get the priority.- Returns:
- the priority
-
handleEvent
Dispatch the given event.Subclasses should override
dispatch(Object).- Parameters:
event- the event- Throws:
InvocationTargetException- thrown if an exception is thrown during dispatch
-
dispatch
Dispatch the event.- Parameters:
event- the event object- Throws:
Exception- an exception that may be thrown
-
compareTo
- Specified by:
compareToin interfaceComparable<EventHandler>
-
hashCode
public abstract int hashCode() -
equals
-
toString
-