View Javadoc

1   /*
2    * $Id: EndpointPollingJobConfig.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   * Configuration for the {@link EndpointPollingJob} job.
19   */
20  public class EndpointPollingJobConfig extends AbstractJobConfig
21  {
22      private String endpointRef;
23  
24      //TODO this should use th system default
25      private int timeout = 5000;
26  
27      public String getEndpointRef()
28      {
29          return endpointRef;
30      }
31  
32      public void setEndpointRef(String endpointRef)
33      {
34          this.endpointRef = endpointRef;
35      }
36  
37      public int getTimeout()
38      {
39          return timeout;
40      }
41  
42      public void setTimeout(int timeout)
43      {
44          this.timeout = timeout;
45      }
46  
47      @Override
48      protected Class<? extends StatefulJob> getStatefulJobClass()
49      {
50          return StatefulEndpointPollingJob.class;
51      }
52  
53      @Override
54      protected Class<? extends Job> getStatelessJobClass()
55      {
56          return EndpointPollingJob.class;
57      }
58  }