Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CustomJobConfig |
|
| 0.0;0 |
1 | /* | |
2 | * $Id: CustomJobConfig.java 20321 2010-11-24 15:21:24Z dfeist $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | package org.mule.transport.quartz.jobs; | |
11 | ||
12 | import org.mule.transport.quartz.config.AbstractJobConfig; | |
13 | ||
14 | import org.quartz.Job; | |
15 | import org.quartz.StatefulJob; | |
16 | ||
17 | /** | |
18 | * This configuration simply holds a reference to a user defined job to execute. | |
19 | */ | |
20 | 0 | public class CustomJobConfig extends AbstractJobConfig |
21 | { | |
22 | private Job job; | |
23 | ||
24 | public Job getJob() | |
25 | { | |
26 | 0 | return job; |
27 | } | |
28 | ||
29 | public void setJob(Job job) | |
30 | { | |
31 | 0 | this.job = job; |
32 | 0 | setStateful(job instanceof StatefulJob); |
33 | 0 | } |
34 | ||
35 | @Override | |
36 | protected Class<? extends StatefulJob> getStatefulJobClass() | |
37 | { | |
38 | 0 | return StatefulCustomJob.class; |
39 | } | |
40 | ||
41 | @Override | |
42 | protected Class<? extends Job> getStatelessJobClass() | |
43 | { | |
44 | 0 | return CustomJob.class; |
45 | } | |
46 | } |