|
JBoss Threads 2.0.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlockingExecutor
An executor which can optionally block or not block on task submission.
| Method Summary | |
|---|---|
void |
execute(Runnable task)
Executes the given command at some time in the future. |
void |
executeBlocking(Runnable task)
Execute a task, blocking until it can be accepted, or until the calling thread is interrupted. |
void |
executeBlocking(Runnable task,
long timeout,
TimeUnit unit)
Execute a task, blocking until it can be accepted, a timeout elapses, or the calling thread is interrupted. |
void |
executeNonBlocking(Runnable task)
Execute a task, without blocking. |
| Method Detail |
|---|
void execute(Runnable task)
execute in interface Executortask - the task to submit
ExecutionInterruptedException - if the executor is configured to block, and the thread was interrupted while waiting
for the task to be accepted
StoppedExecutorException - if the executor was shut down before the task was accepted
ThreadCreationException - if a thread could not be created for some reason
RejectedExecutionException - if execution is rejected for some other reason
NullPointerException - if command is null
void executeBlocking(Runnable task)
throws RejectedExecutionException,
InterruptedException
task - the task to submit
StoppedExecutorException - if the executor was shut down before the task was accepted
ThreadCreationException - if a thread could not be created for some reason
RejectedExecutionException - if execution is rejected for some other reason
InterruptedException - if the current thread was interrupted before the task could be accepted
NullPointerException - if command is null
void executeBlocking(Runnable task,
long timeout,
TimeUnit unit)
throws RejectedExecutionException,
InterruptedException
task - the task to submittimeout - the amount of time to waitunit - the unit of time
ExecutionTimedOutException - if the timeout elapsed before a task could be accepted
StoppedExecutorException - if the executor was shut down before the task was accepted
ThreadCreationException - if a thread could not be created for some reason
RejectedExecutionException - if execution is rejected for some other reason
InterruptedException - if the current thread was interrupted before the task could be accepted
NullPointerException - if command is null
void executeNonBlocking(Runnable task)
throws RejectedExecutionException
task - the task to submit
StoppedExecutorException - if the executor was shut down before the task was accepted
ThreadCreationException - if a thread could not be created for some reason
RejectedExecutionException - if execution is rejected for some other reason
NullPointerException - if command is null
|
JBoss Threads 2.0.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||