| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | ManagedExecutors.RunnableAdapter
Adapter for Runnable to include ManagedTask interface methods |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: Returns theisShutdown() value if the current thread is a
ManageableThread created by ManagedThreadFactory, or
false if the current thread is not a ManageableThread.Utility method for checking the |
| public static Runnable | Returns: a Runnable objectthe task to have the given ManagedTaskListener associated with task, ManagedTaskListener (optional) the taskListener)ManagedTaskListener to receive
lifecycle events notification when the task is submitted. If task
implements ManagedTask, and taskListener is not
null, the ManagedTaskListener interface methods of the
task will not be called.Returns a |
| public static Runnable | Returns: a Runnable objectthe task to have the given ManagedTaskListener associated with task, Map<String, String> (optional) execution properties to provide additional hints
to executionProperties, ManagedTaskListener ManagedExecutorService or ManagedScheduledExecutorService
when the task is submitted.
If task implements ManagedTask with non-empty
execution properties, the Runnable returned will contain the union
of the execution properties specified in the task and the executionProperties
argument, with the latter taking precedence if the same property key is
specified in both.
After the method is called, further changes to the Map
object will not be reflected in the Runnable returned by this method.(optional) the taskListener)ManagedTaskListener to receive
lifecycle events notification when the task is submitted. If task
implements ManagedTask, and taskListener is not
null, the ManagedTaskListener interface methods of the
task will not be called.Returns a |
| public static <V> Callable | Returns: a Callable objectthe task to have the given ManagedTaskListener associated with task, ManagedTaskListener (optional) the taskListener)ManagedTaskListener to receive
lifecycle events notification when the task is submitted. If task
implements ManagedTask, and taskListener is not
null, the ManagedTaskListener interface methods of the
task will not be called.Returns a |
| public static <V> Callable | Returns: a Callable objectthe task to have the given ManagedTaskListener associated with task, Map<String, String> (optional) execution properties to provide additional hints
to executionProperties, ManagedTaskListener ManagedExecutorService or ManagedScheduledExecutorService
when the task is submitted.
If task implements ManagedTask with non-empty
execution properties, the Runnable returned will contain the union
of the execution properties specified in the task and the executionProperties
argument, with the latter taking precedence if the same property key is
specified in both.
After the method is called, further changes to the Map
object will not be reflected in the Callable returned by this method.(optional) the taskListener)ManagedTaskListener to receive
lifecycle events notification when the task is submitted. If task
implements ManagedTask, and taskListener is not
null, the ManagedTaskListener interface methods of the
task will not be called.Returns a |
| NULL_TASK_ERROR_MSG | back to summary |
|---|---|
| pack-priv static final String NULL_TASK_ERROR_MSG | |
| ManagedExecutors | back to summary |
|---|---|
| private ManagedExecutors() Not suppose to create instances of this class | |
| isCurrentThreadShutdown | back to summary |
|---|---|
| public static boolean isCurrentThreadShutdown() Utility method for checking the
| |
| managedTask | back to summary |
|---|---|
| public static Runnable managedTask(Runnable task, ManagedTaskListener taskListener) throws IllegalArgumentException Returns a Example: Runnable task = ...; ManagedTaskListener myTaskListener = ...; ManagedExecutorService executor = ...; Runnable taskWithListener = ManagedExecutors.managedTask(task, myTaskListener); executor.submit(taskWithListener);
| |
| managedTask | back to summary |
|---|---|
| public static Runnable managedTask(Runnable task, Map<String, String> executionProperties, ManagedTaskListener taskListener) throws IllegalArgumentException Returns a
| |
| managedTask | back to summary |
|---|---|
| public static <V> Callable Returns a
| |
| managedTask | back to summary |
|---|---|
| public static <V> Callable Returns a
| |
| Modifier and Type | Field and Description |
|---|---|
| protected final Map | |
| protected final ManagedTask | |
| protected final ManagedTaskListener |
| Access | Constructor and Description |
|---|---|
| public | Adapter(ManagedTaskListener taskListener, Map<String, String> executionProperties, ManagedTask managedTask)
|
| Modifier and Type | Method and Description |
|---|---|
| public Map | getExecutionProperties()
Implements javax. ManagedExecutorService or
ManagedScheduledExecutorService when executing this task.
|
| public ManagedTaskListener | getManagedTaskListener()
Implements javax. ManagedTaskListener to receive notification of lifecycle
events of this task.
|
| private Map |
| executionProperties | back to summary |
|---|---|
| protected final Map<String, String> executionProperties | |
| managedTask | back to summary |
|---|---|
| protected final ManagedTask managedTask | |
| taskListener | back to summary |
|---|---|
| protected final ManagedTaskListener taskListener | |
| Adapter | back to summary |
|---|---|
| public Adapter(ManagedTaskListener taskListener, Map<String, String> executionProperties, ManagedTask managedTask) | |
| getExecutionProperties | back to summary |
|---|---|
| public Map Implements javax. Doc from javax. Provides additional information to the Some standard property keys are defined in this class. Custom property keys may be defined but must not begin with "javax.enterprise.concurrent.". | |
| getManagedTaskListener | back to summary |
|---|---|
| public ManagedTaskListener getManagedTaskListener() Implements javax. Doc from javax. The
| |
| initExecutionProperties | back to summary |
|---|---|
| private Map | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Callable |
| Access | Constructor and Description |
|---|---|
| public | CallableAdapter(Callable<V> task, Map<String, String> executionProperties, ManagedTaskListener taskListener)
|
| Modifier and Type | Method and Description |
|---|---|
| public V | call()
Implements java. |
| task | back to summary |
|---|---|
| pack-priv final Callable<V> task | |
| CallableAdapter | back to summary |
|---|---|
| public CallableAdapter(Callable<V> task, Map<String, String> executionProperties, ManagedTaskListener taskListener) | |
| call | back to summary |
|---|---|
| public V call() throws Exception Implements java. Doc from java. Computes a result, or throws an exception if unable to do so. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Runnable |
| Access | Constructor and Description |
|---|---|
| public | RunnableAdapter(Runnable task, Map<String, String> executionProperties, ManagedTaskListener taskListener)
|
| Modifier and Type | Method and Description |
|---|---|
| public void |
| task | back to summary |
|---|---|
| pack-priv final Runnable task | |
| RunnableAdapter | back to summary |
|---|---|
| public RunnableAdapter(Runnable task, Map<String, String> executionProperties, ManagedTaskListener taskListener) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |