1   package org.apache.stratum.scheduler.examplejobs;
2   
3   /*
4    * Copyright 2001-2005 The Apache Software Foundation or its licensors,
5    * as applicable.
6    *
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   *
11   *     http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  import java.util.Date;
21  
22  import org.quartz.Job;
23  import org.quartz.JobExecutionContext;
24  import org.quartz.JobExecutionException;
25  
26  /***
27   * <p>
28   * A dumb implementation of Job, for unittesting purposes.
29   * </p>
30   *
31   * @author James House
32   */
33  public class JobTwo
34          implements Job
35  {
36      /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
37      *
38      * Constructors.
39      *
40      * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
41      public JobTwo()
42      {
43      }
44  
45      /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
46       *
47       * Interface.
48       *
49       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
50  
51      /***
52       * <p>
53       * Called by the <code>{@link org.quartz.Scheduler}</code> when a <code>{@link org.quartz.Trigger}</code> fires that is
54       * associated with the <code>Job</code>.
55       * </p>
56       *
57       * @param context TODO: DOCUMENT ME!
58       *
59       * @throws JobExecutionException if there is an exception while executing the job.
60       */
61      public void execute(JobExecutionContext context)
62              throws JobExecutionException
63      {
64          System.err.println("    --- Testing Scheduler Component\n    --- " + context.getJobDetail().getFullName() + " executed.["
65              + new Date() + "]");
66      }
67  }