Class EventManger<K,​R,​E extends Exception>

  • Type Parameters:
    K - the event key.
    R - the event result.
    E - the exception which could be thrown by the action.

    public class EventManger<K,​R,​E extends Exception>
    extends Object
    The event manager class is used to perform actions and wait for an event, which is usually caused by the action (or maybe never occurs).

    Events are distinguished by an unique event key. They can produce an event result, which can simply be null.

    The action is able to throw an exception.

    • Method Detail

      • signalEvent

        public boolean signalEvent​(K eventKey,
                                   R eventResult)
        Signal an event and the event result.

        This method will return false if the event was not created with performActionAndWaitForEvent(Object, long, Callback).

        eventKey - the event key, must not be null.
        eventResult - the event result, may be null.
        true if the event was found and signaled, false otherwise.