java.lang.Object
it.rebirthproject.ufoeb.architecture.executor.EventExecutor
All Implemented Interfaces:
Runnable

public class EventExecutor extends Object implements Runnable
An EventExecutor is a worker used by the bus to notify listeners. It's possible to use just one EventExecutor or more, depending on the bus configuration specified using the EventBusBuilder
See Also:
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
      The logger used by this class
    • registrationList

      private final List<Registration> registrationList
    • eventToPost

      private final Object eventToPost
  • Constructor Details

    • EventExecutor

      public EventExecutor(List<Registration> registrationList, Object eventToPost)
      The constructor used to build an EventExecutor
      Parameters:
      registrationList - List of registrations that get the event
      eventToPost - The posted event to send to the registrations
  • Method Details

    • run

      public void run()
      This is the main method of the EventExecutor. It just iterate to process the event with every registrations.
      Specified by:
      run in interface Runnable
    • getEventToPost

      public Object getEventToPost()
      Get the event to post to the various registrations
      Returns:
      The event to post to the registrations
    • getRegistrationList

      public List<Registration> getRegistrationList()
      Get the registrations list
      Returns:
      The registrations list