Interface ListenerBase<S,D>

All Known Implementing Classes:
Listener, ListenerService.AsynchronousListener
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 ListenerBase<S,D>
Created by The eXo Platform SAS
This class is registered with the Listener service and is invoked when an event with the same name is broadcasted. You can have many listeners with the same name to listen to an event.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
     
    void
    onEvent(Event<S,D> event)
    This method should be invoked when an event with the same name is broadcasted
  • Method Details

    • onEvent

      void onEvent(Event<S,D> event) throws Exception
      This method should be invoked when an event with the same name is broadcasted
      Parameters:
      event - the event instance
      Throws:
      Exception
    • getName

      default String getName()