Class EventProcessorImpl

java.lang.Object
com.spinyowl.legui.listener.processor.EventProcessorImpl
All Implemented Interfaces:
EventProcessor

public class EventProcessorImpl extends Object implements EventProcessor
Default implementation of event processor.
  • Constructor Details

    • EventProcessorImpl

      public EventProcessorImpl()
  • Method Details

    • processEvents

      public void processEvents()
      Should be called to process events.
      Specified by:
      processEvents in interface EventProcessor
    • pushEvent

      public void pushEvent(Event event)
      Used to push event to event processor.
      Specified by:
      pushEvent in interface EventProcessor
      Parameters:
      event - event to push to event processor.
    • hasEvents

      public boolean hasEvents()
      Returns true if there are events that should be processed.
      Specified by:
      hasEvents in interface EventProcessor
      Returns:
      true if there are events that should be processed.
    • setDebugEventConsumer

      public void setDebugEventConsumer(Consumer<Event> debugEventConsumer)
      Used to add additional logic to see pushed events.

      Could be used to log events that pushed to event processor.

      Parameters:
      debugEventConsumer - consumer to add.