Module jakarta.mail
Package jakarta.mail

Class EventQueue

java.lang.Object
jakarta.mail.EventQueue
All Implemented Interfaces:
Runnable

class EventQueue extends Object implements Runnable
Package private class used by Store & Folder to dispatch events. This class implements an event queue, and a dispatcher thread that dequeues and dispatches events from the queue.
  • Field Details

  • Constructor Details

    • EventQueue

      EventQueue(Executor ex)
      Construct an EventQueue using the specified Executor. If the Executor is null, threads will be created as needed.
  • Method Details

    • enqueue

      void enqueue(MailEvent event, Vector<? extends EventListener> vector)
      Enqueue an event.
    • terminateQueue

      void terminateQueue()
      Terminate the task running the queue, but only if there is a queue.
    • getApplicationEventQueue

      static EventQueue getApplicationEventQueue(Executor ex)
      Create (if necessary) an application-scoped event queue. Application scoping is based on the thread's context class loader.
    • run

      public void run()
      Pull events off the queue and dispatch them.
      Specified by:
      run in interface Runnable