View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.quartz.jobs;
8   
9   import org.mule.transport.NullPayload;
10  import org.mule.transport.quartz.config.AbstractJobConfig;
11  
12  import org.quartz.Job;
13  import org.quartz.StatefulJob;
14  
15  
16  /**
17   * The configuration for the {@link EventGeneratorJob} job.
18   */
19  public class EventGeneratorJobConfig extends AbstractJobConfig
20  {
21      private Object payload = NullPayload.getInstance();
22  
23      public Object getPayload()
24      {
25          return payload;
26      }
27  
28      public void setPayload(Object payload)
29      {
30          this.payload = payload;
31      }
32  
33      @Override
34      protected Class<? extends StatefulJob> getStatefulJobClass()
35      {
36          return StatefulEventGeneratorJob.class;
37      }
38  
39      @Override
40      protected Class<? extends Job> getStatelessJobClass()
41      {
42          return EventGeneratorJob.class;
43      }
44  }