1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.transport.quartz.jobs; |
8 | |
|
9 | |
import org.mule.transport.quartz.config.AbstractJobConfig; |
10 | |
|
11 | |
import org.quartz.Job; |
12 | |
import org.quartz.StatefulJob; |
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | 0 | public class CustomJobConfig extends AbstractJobConfig |
18 | |
{ |
19 | |
private Job job; |
20 | |
|
21 | |
public Job getJob() |
22 | |
{ |
23 | 0 | return job; |
24 | |
} |
25 | |
|
26 | |
public void setJob(Job job) |
27 | |
{ |
28 | 0 | this.job = job; |
29 | 0 | setStateful(job instanceof StatefulJob); |
30 | 0 | } |
31 | |
|
32 | |
@Override |
33 | |
protected Class<? extends StatefulJob> getStatefulJobClass() |
34 | |
{ |
35 | 0 | return StatefulCustomJob.class; |
36 | |
} |
37 | |
|
38 | |
@Override |
39 | |
protected Class<? extends Job> getStatelessJobClass() |
40 | |
{ |
41 | 0 | return CustomJob.class; |
42 | |
} |
43 | |
} |