View Javadoc

1   /*
2    * $Id: ScheduledDispatchJobConfig.java 19191 2010-08-25 21:05:23Z tcarlson $
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   * The configuration for the {@link ScheduledDispatchJob} job.
19   */
20  public class ScheduledDispatchJobConfig extends AbstractJobConfig
21  {
22      /** 
23       * The endpoint ref has to be a string and not a reference to the actual endpoint because
24       * jobs can get stored in a database 
25       */
26      private String endpointRef;
27  
28      public String getEndpointRef()
29      {
30          return endpointRef;
31      }
32  
33      public void setEndpointRef(String endpointRef)
34      {
35          this.endpointRef = endpointRef;
36      }
37  
38      @Override
39      protected Class<? extends StatefulJob> getStatefulJobClass()
40      {
41          return StatefulScheduledDispatchJob.class;
42      }
43  
44      @Override
45      protected Class<? extends Job> getStatelessJobClass()
46      {
47          return ScheduledDispatchJob.class;
48      }
49  }