public interface JobExecutor
| Modifier and Type | Interface and Description |
|---|---|
static class |
JobExecutor.State |
| Modifier and Type | Method and Description |
|---|---|
void |
addJobType(String jobName,
Class<?> jobType)
Allow the given job type to be executed.
|
void |
end(boolean now)
Shutdown this JobExecutor.
|
ExceptionHandler |
getExceptionHandler()
The current exception handler.
|
Map<String,Class<?>> |
getJobTypes()
The allowed job names and types that this JobExecutor will execute.
|
boolean |
isProcessingJob()
Returns whether this JobExecutor is currently processing a job.
|
boolean |
isShutdown()
Returns whether this JobExecutor is either shutdown or in the process of shutting down.
|
void |
join(long millis)
Wait for this JobExecutor to complete.
|
void |
removeJobName(String jobName)
Disallow the job name from being executed.
|
void |
removeJobType(Class<?> jobType)
Disallow the job type from being executed.
|
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
Set this JobExecutor's exception handler to the given handler.
|
void |
setJobTypes(Map<String,? extends Class<?>> jobTypes)
Clear any current allowed job types and use the given set.
|
Map<String,Class<?>> getJobTypes()
void addJobType(String jobName, Class<?> jobType)
jobName - the job name as seenjobType - the job type to allowvoid removeJobType(Class<?> jobType)
jobType - the job type to disallowvoid removeJobName(String jobName)
jobName - the job name to disallowvoid setJobTypes(Map<String,? extends Class<?>> jobTypes)
jobTypes - the job types to allowExceptionHandler getExceptionHandler()
void setExceptionHandler(ExceptionHandler exceptionHandler)
exceptionHandler - the exception handler to usevoid end(boolean now)
now - if true, an effort will be made to stop any job in progressboolean isShutdown()
boolean isProcessingJob()
void join(long millis)
throws InterruptedException
end(boolean).millis - the time to wait in millisecondsInterruptedException - if any thread has interrupted the current threadCopyright © 2011-2013. All Rights Reserved.