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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) voidbooleanbooleanprotected <T> RunnableFuture<T> newTaskFor(Runnable rable, T result) protected <T> RunnableFuture<T> newTaskFor(Callable<T> cable) voidshutdown()<T> EDTRunnableFuture<T> submit(EDTRunnableFuture<T> task) Submits aEDTRunnableFuturetask for execution and returns it.Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
newTaskForin classAbstractExecutorService
-
newTaskFor
- Overrides:
newTaskForin classAbstractExecutorService
-
submit
Submits aEDTRunnableFuturetask 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
-