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
-
Constructor Summary
ModifierConstructorDescriptionprotected
EventHandler
(EventHandler.Priority priority) Create a new event handler. -
Method Summary
Modifier and TypeMethodDescriptionint
abstract void
Dispatch the event.abstract boolean
Get the priority.final void
handleEvent
(Object event) Dispatch the given event.abstract int
hashCode()
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:
compareTo
in interfaceComparable<EventHandler>
-
hashCode
public abstract int hashCode() -
equals
-
toString
-