Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.modules.scheduledjob
Class SimpleJob

    java.lang.Object
      org.apache.turbine.modules.Assembler
          org.apache.turbine.modules.ScheduledJob
              org.apache.turbine.modules.scheduledjob.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 615328 2008-01-25 20:25:05Z 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
`SimpleJob()`

Method Summary
`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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.