Package VASSAL.tools.swing
Class EDTExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
VASSAL.tools.swing.EDTExecutorService
- All Implemented Interfaces:
AutoCloseable
,Executor
,ExecutorService
An
ExecutorService
which submits to Event Dispatch Thread.- Since:
- 3.2.0
- Author:
- Joel Uckelman
- See Also:
-
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.Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
close
-
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
-