Type Parameters:
T - The event type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EventHandler<T>
The actual subscriber of an event of type T that should be listened to and eventually called.
  • Method Summary

    Modifier and Type
    Method
    Description
    acceptEvent(T event)
    A method that will be called upon the event.
  • Method Details

    • acceptEvent

      Result<?> acceptEvent(T event) throws Throwable
      A method that will be called upon the event. The method is allowed to through any kind of exception, which will be caught by an interceptor and appropriately delegated to the appropriate exception handlers.

      The method returns a Result of any kind which the publisher of this event can use.

      Parameters:
      event - The concrete event that was published
      Returns:
      A result that holds any kind of information.
      Throws:
      Exception - Everything that can be thrown.
      Throwable