Package VASSAL.tools.swing
Class EDTExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
VASSAL.tools.swing.EDTExecutorService
- All Implemented Interfaces:
Executor
,ExecutorService
An
ExecutorService
which submits to Event Dispatch Thread.- Since:
- 3.2.0
- Author:
- Joel Uckelman
- See Also:
EDTRunnableFuture
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination(long timeout, TimeUnit unit)
void
boolean
boolean
protected <T> RunnableFuture<T>
newTaskFor(Runnable rable, T result)
protected <T> RunnableFuture<T>
newTaskFor(Callable<T> cable)
void
shutdown()
<T> EDTRunnableFuture<T>
submit(EDTRunnableFuture<T> task)
Submits aEDTRunnableFuture
task for execution and returns it.
-
Field Details
-
poison_pill
-
-
Constructor Details
-
EDTExecutorService
public EDTExecutorService()
-
-
Method Details
-
awaitTermination
- Throws:
InterruptedException
-
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
shutdown
public void shutdown() -
shutdownNow
-
newTaskFor
- Overrides:
newTaskFor
in classAbstractExecutorService
-
newTaskFor
- Overrides:
newTaskFor
in classAbstractExecutorService
-
submit
Submits aEDTRunnableFuture
task for execution and returns it.- Parameters:
task
- the task to submit- Returns:
- the task which was submitted
- Throws:
RejectedExecutionException
- if the task cannot be scheduled for executionNullPointerException
- if the task isnull
-
execute
-