Class GlueQuartzJobBean
java.lang.Object
org.springframework.scheduling.quartz.QuartzJobBean
com.poscoict.glueframework.scheduling.GlueQuartzJobBean
- All Implemented Interfaces:
org.quartz.Job
QuartzJobBean 확장(GlueService 실행).
Quartz Scheduler 사용시 JobDetailBean의 jobClass로 사용한다.
JobDetailBean의 jobDataAsMap에는 ServiceName이 항상 있어야 한다.
Quartz Scheduler 사용시 JobDetailBean의 jobClass로 사용한다.
JobDetailBean의 jobDataAsMap에는 ServiceName이 항상 있어야 한다.
key(jobDataAsMap)
- ServiceName : (필수) GlueService
- 그외 key 추가 가능
예제
사용 예# 1
<bean id="jobDetail-job" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="com.poscoict.glueframework.scheduling.GlueQuartzJobBean"/>
<property name="jobDataAsMap">
<map>
<entry key="ServiceName" value="job-service"/>
</map>
</property>
</bean>
사용 예# 2
<bean id="jobDetail-job" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="com.poscoict.glueframework.scheduling.GlueQuartzJobBean"/>
<property name="jobDataAsMap">
<map>
<entry key="ServiceName" value="job-service"/>
<entry key="deptno" value="10"/>
</map>
</property>
</bean>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterExecuteJob
(org.quartz.JobExecutionContext context) protected void
beforeExecuteJob
(org.quartz.JobExecutionContext context) protected final void
executeInternal
(org.quartz.JobExecutionContext context) protected void
executeJob
(org.quartz.JobExecutionContext context) Methods inherited from class org.springframework.scheduling.quartz.QuartzJobBean
execute
-
Field Details
-
logger
protected org.slf4j.Logger logger
-
-
Constructor Details
-
GlueQuartzJobBean
public GlueQuartzJobBean()
-
-
Method Details
-
executeInternal
protected final void executeInternal(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException - Specified by:
executeInternal
in classQuartzJobBean
- Throws:
org.quartz.JobExecutionException
-
executeJob
protected void executeJob(org.quartz.JobExecutionContext context) - Parameters:
context
-
-
beforeExecuteJob
protected void beforeExecuteJob(org.quartz.JobExecutionContext context) - Parameters:
context
-
-
afterExecuteJob
protected void afterExecuteJob(org.quartz.JobExecutionContext context) - Parameters:
context
-
-