java.lang.Object
is.codion.swing.common.model.dispatch.SwingDispatcher
All Implemented Interfaces:
Dispatcher

public final class SwingDispatcher extends Object implements Dispatcher
A Dispatcher running tasks on the Event Dispatch Thread.
  • Constructor Details

    • SwingDispatcher

      public SwingDispatcher()
  • Method Details

    • executor

      public Executor executor()
      Description copied from interface: Dispatcher

      Returns an Executor running tasks on the dispatch context, resolved for the caller.

      Must be called where a context is bound, see Dispatcher.bound(), so that implementations binding a context per request or session resolve the right one.

      Specified by:
      executor in interface Dispatcher
      Returns:
      an Executor running tasks on the dispatch context
    • bound

      public boolean bound()
      Description copied from interface: Dispatcher

      Returns true if a dispatch context is bound to the caller, that is, if this is the context results must be handed back to and which must not be blocked.

      This reports a fact, not a recommendation. Whether to hand work off on the strength of it is left to the caller, some always do so regardless.

      Specified by:
      bound in interface Dispatcher
      Returns:
      true if a dispatch context is bound to the caller