public class SwingExecutorService
extends java.util.concurrent.AbstractExecutorService
implements java.util.concurrent.ScheduledExecutorService
Constructor and Description |
---|
SwingExecutorService()
Creates a new ScheduledExecutorService.
|
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit units) |
void |
execute(java.lang.Runnable task) |
boolean |
isShutdown() |
boolean |
isTerminated() |
<V> java.util.concurrent.ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> task,
long initialDelay,
java.util.concurrent.TimeUnit units) |
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable task,
long initialDelay,
java.util.concurrent.TimeUnit units) |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable task,
long initialDelay,
long interval,
java.util.concurrent.TimeUnit units) |
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable task,
long initialDelay,
long interval,
java.util.concurrent.TimeUnit units) |
void |
shutdown()
Stops this executor service from accepting any more tasks.
|
java.util.List<java.lang.Runnable> |
shutdownNow() |
<T> T |
wrap(java.lang.Class<T> interfaceClass,
T instance)
Creates a proxy version of interfaceClass that executes instance
on the Swing EDT when any of its methods are invoked.
|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public SwingExecutorService()
public <T> T wrap(java.lang.Class<T> interfaceClass, T instance)
interfaceClass
- the interface to generate.instance
- the instance to delegate calls to.public void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
public boolean isShutdown()
isShutdown
in interface java.util.concurrent.ExecutorService
public boolean isTerminated()
isTerminated
in interface java.util.concurrent.ExecutorService
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException
awaitTermination
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
public void execute(java.lang.Runnable task)
execute
in interface java.util.concurrent.Executor
public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable task, long initialDelay, java.util.concurrent.TimeUnit units)
schedule
in interface java.util.concurrent.ScheduledExecutorService
public <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> task, long initialDelay, java.util.concurrent.TimeUnit units)
schedule
in interface java.util.concurrent.ScheduledExecutorService
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable task, long initialDelay, long interval, java.util.concurrent.TimeUnit units)
scheduleAtFixedRate
in interface java.util.concurrent.ScheduledExecutorService
public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable task, long initialDelay, long interval, java.util.concurrent.TimeUnit units)
scheduleWithFixedDelay
in interface java.util.concurrent.ScheduledExecutorService