Interface IoEventQueueHandler

All Superinterfaces:
EventListener
All Known Implementing Classes:
IoEventQueueThrottle

public interface IoEventQueueHandler extends EventListener
Listens and filters all event queue operations occurring in OrderedThreadPoolExecutor and UnorderedThreadPoolExecutor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IoEventQueueHandler
    A dummy handler which always accepts event doing nothing particular.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(Object source, IoEvent event)
     
    void
    offered(Object source, IoEvent event)
    Invoked after the specified event has been offered to the event queue.
    void
    polled(Object source, IoEvent event)
    Invoked after the specified event has been polled from the event queue.
  • Field Details

    • NOOP

      static final IoEventQueueHandler NOOP
      A dummy handler which always accepts event doing nothing particular.
  • Method Details

    • accept

      boolean accept(Object source, IoEvent event)
      Parameters:
      source - The source of event
      event - The received event
      Returns:
      true if and only if the specified >event is allowed to be offered to the event queue. The event is dropped if false is returned.
    • offered

      void offered(Object source, IoEvent event)
      Invoked after the specified event has been offered to the event queue.
      Parameters:
      source - The source of event
      event - The received event
    • polled

      void polled(Object source, IoEvent event)
      Invoked after the specified event has been polled from the event queue.
      Parameters:
      source - The source of event
      event - The received event