org.apache.turbine.modules.scheduledjobs

## Class SimpleJob

- java.lang.Object
- - org.apache.turbine.modules.Assembler
  - - org.apache.turbine.modules.ScheduledJob
    - - org.apache.turbine.modules.scheduledjobs.SimpleJob

-     public class SimpleJob
      extends ScheduledJob

  Simple job for use with unit testing of the scheduler service. This job merely increments a static counter variable when it is run. You can check the counter to verify the job has run.
  Version:
    $Id: SimpleJob.java 1723703 2016-01-08 11:40:19Z tv $
  Author:
    Quinton McCombs, Eric Pugh

- - ### Field Summary

    - ### Fields inherited from class org.apache.turbine.modules.ScheduledJob

      `CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleJob()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `getCounter()` Returns the counter value.
    `void` | `run(JobEntry job)` Run the Jobentry from the scheduler queue.
    `static void` | `setCounter(int i)` Sets the counter.

    - ### Methods inherited from class org.apache.turbine.modules.ScheduledJob

      `getPrefix`

    - ### Methods inherited from class org.apache.turbine.modules.Assembler

      `getRunData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleJob

          public SimpleJob()

  - ### Method Detail

    - #### run

          public void run(JobEntry job)
                   throws Exception

      Run the Jobentry from the scheduler queue.
      Specified by:
        `run` in class `ScheduledJob`
      Parameters:
        `job` - The job to run.
      Throws:
        `Exception` - generic exception

    - #### getCounter

          public static int getCounter()

      Returns the counter value.
      Returns:
        The counter value

    - #### setCounter

          public static void setCounter(int i)

      Sets the counter.
      Parameters:
        `i` - The new counter value

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.