Package com.carfey.ops.event.dispatch
Class EventHooks
- java.lang.Object
-
- com.carfey.ops.event.dispatch.EventHooks
-
public class EventHooks extends java.lang.ObjectProvides static methods for dealing withEventHookinstances, including methods to register and unregister those that Obsidian should use.- Since:
- 4.5
-
-
Constructor Summary
Constructors Constructor Description EventHooks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearEventHooks()Clears all registeredEventHookinstances.static java.util.Collection<EventHook>getEventHooks()Returns all registeredEventHookinstances that are used when notification events fire.static voidregister(EventHook hook)Add the givenEventHookand so it will be used for future notifications.static voidremove(EventHook hook)Remove the givenEventHookand stop it from being used for notifications.
-
-
-
Method Detail
-
getEventHooks
public static java.util.Collection<EventHook> getEventHooks()
Returns all registeredEventHookinstances that are used when notification events fire.- Returns:
- a thread-safe, unmodifiable list
-
register
public static void register(EventHook hook)
Add the givenEventHookand so it will be used for future notifications. These registrations will live as long as the JVM is up, unless modified via this method,remove(EventHook)andclearEventHooks().
-
remove
public static void remove(EventHook hook)
Remove the givenEventHookand stop it from being used for notifications.
-
clearEventHooks
public static void clearEventHooks()
Clears all registeredEventHookinstances.
-
-