Class JobService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.scheduler.service.scheduled.JobService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
CommandJobService
,MaintainJobService
Job Service Class
Used to launch a maintain process as a scheduled batch
- Author:
- pvidal
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JobService
(ExecutionService executionService, MaintainService maintainService, QueryUtil queryUtil, TaskDAO taskDAO, org.springframework.context.ApplicationEventPublisher eventPublisher, Duration defaultTimeout) Job service constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract Future<ServiceData>
executeJob
(Task task, TaskExecution execution, org.quartz.JobDataMap dataMap) Execute jobprotected Integer
getTimeout
(Task task) Get timeout valuelaunchBatch
(SchedulerJob job, Future<ServiceData> process) Start batch processMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
JobService
protected JobService(ExecutionService executionService, MaintainService maintainService, QueryUtil queryUtil, TaskDAO taskDAO, org.springframework.context.ApplicationEventPublisher eventPublisher, Duration defaultTimeout) Job service constructor- Parameters:
executionService
- Execution servicemaintainService
- Maintain servicequeryUtil
- QueryUtil servicetaskDAO
- Task DAOeventPublisher
- Event publisherdefaultTimeout
- Task timeout
-
-
Method Details
-
executeJob
public abstract Future<ServiceData> executeJob(Task task, TaskExecution execution, org.quartz.JobDataMap dataMap) throws InterruptedException Execute job- Parameters:
task
- Taskexecution
- Task executiondataMap
- Job data map- Returns:
- Future job result
- Throws:
InterruptedException
- Error job
-
startTask
- Throws:
AWException
-
getTimeout
Get timeout value- Parameters:
task
- Task- Returns:
- timeout of task or default timeout
-
launchBatch
Start batch process- Returns:
- Batch status
- Throws:
AWException
-