ListeningExecutorService implementation that creates ListenableFuture
instances for each Runnable and Callable submitted to it. These tasks are run
with the abstract execute(Runnable) method.
In addition to execute, subclasses must implement all methods related to shutdown and
termination.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final <T extends @Nullable Object> RunnableFuture | newTaskFor(Runnable
the runnable task being wrapped runnable, T the default value for the returned future value)Overrides java. RunnableFuture for the given runnable and default
value.
|
| protected final <T extends @Nullable Object> RunnableFuture | newTaskFor(Callable<T>
the callable task being wrapped callable)Overrides java. RunnableFuture for the given callable task.
|
| public ListenableFuture | submit(Runnable
the task to submit task)Overrides java. Implements com. |
| public <T extends @Nullable Object> ListenableFuture | submit(Runnable
the task to submit task, T the result to return result)Overrides java. Implements com. |
| public <T extends @Nullable Object> ListenableFuture | submit(Callable<T>
the task to submit task)Overrides java. Implements com. |
| AbstractListeningExecutorService | back to summary |
|---|---|
| public AbstractListeningExecutorService() | |
| newTaskFor | back to summary |
|---|---|
| protected final <T extends @Nullable Object> RunnableFuture Overrides java. Doc from java. Returns a
| |
| newTaskFor | back to summary |
|---|---|
| protected final <T extends @Nullable Object> RunnableFuture Overrides java. Doc from java. Returns a
| |
| submit | back to summary |
|---|---|
| public ListenableFuture Overrides java. Implements com. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's
| |
| submit | back to summary |
|---|---|
| public <T extends @Nullable Object> ListenableFuture Overrides java. Implements com. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's
| |
| submit | back to summary |
|---|---|
| public <T extends @Nullable Object> ListenableFuture Overrides java. Implements com. Doc from java. Submits a value-returning task for execution and returns a
Future representing the pending results of the task. The
Future's
If you would like to immediately block waiting
for a task, you can use constructions of the form
Note The
| |