Module is.codion.swing.common.model
Class SwingDispatcher
java.lang.Object
is.codion.swing.common.model.dispatch.SwingDispatcher
- All Implemented Interfaces:
Dispatcher
A
Dispatcher running tasks on the Event Dispatch Thread.-
Field Summary
Fields inherited from interface is.codion.common.utilities.dispatch.Dispatcher
SYNCHRONOUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbound()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.executor()Returns anExecutorrunning tasks on the dispatch context, resolved for the caller.
-
Constructor Details
-
SwingDispatcher
public SwingDispatcher()
-
-
Method Details
-
executor
Description copied from interface:DispatcherReturns an
Executorrunning 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:
executorin interfaceDispatcher- Returns:
- an
Executorrunning tasks on the dispatch context
-
bound
public boolean bound()Description copied from interface:DispatcherReturns 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:
boundin interfaceDispatcher- Returns:
- true if a dispatch context is bound to the caller
-