Interface MasterSerialEventHandlerFactory

All Known Implementing Classes:
DefaultMasterSerialEventHandlerFactory

public interface MasterSerialEventHandlerFactory
Factory for MasterSerialEvent-handlers.
Author:
harald
  • Method Details

    • getInstance

      static MasterSerialEventHandlerFactory getInstance()
      The singleton.
      Returns:
      the singleton
    • getEventHandler

      <T extends MasterSerialEvent> Consumer<T> getEventHandler(Class<T> eventClass)
      Gets the event handler for a master serial event class.
      The handler is simply a Consumer of a MasterSerialEvent and must be stateless. There is only one handler per event type (singleton).
      Type Parameters:
      T - the event type
      Parameters:
      eventClass - the event class
      Returns:
      the event handler, null if there is no handler registered for this remote client