Package org.teamapps.event
Class DecoupledEvent<EVENT_DATA>
java.lang.Object
org.teamapps.event.Event<EVENT_DATA>
org.teamapps.event.DecoupledEvent<EVENT_DATA>
public class DecoupledEvent<EVENT_DATA> extends Event<EVENT_DATA>
Forces events to be handled in a different Thread than the firing one.
-
Constructor Summary
Constructors Constructor Description DecoupledEvent(java.util.concurrent.Executor executor) -
Method Summary
Modifier and Type Method Description protected voidinvokeListener(EVENT_DATA eventData, java.util.function.Consumer<EVENT_DATA> listener)May get overridden.Methods inherited from class org.teamapps.event.Event
addListener, addListener, addListener, addListener, converted, fire, fire, fireIfChanged, fireIgnoringExceptions, removeListener, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DecoupledEvent
public DecoupledEvent(java.util.concurrent.Executor executor)
-
-
Method Details
-
invokeListener
protected void invokeListener(EVENT_DATA eventData, java.util.function.Consumer<EVENT_DATA> listener)Description copied from class:EventMay get overridden.- Overrides:
invokeListenerin classEvent<EVENT_DATA>
-