Class SimpleJob
- java.lang.Object
-
- org.apache.turbine.modules.scheduledjobs.SimpleJob
-
- All Implemented Interfaces:
Assembler
,ScheduledJob
public class SimpleJob extends Object implements 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$
- Author:
- Quinton McCombs, Eric Pugh
-
-
Field Summary
-
Fields inherited from interface org.apache.turbine.modules.ScheduledJob
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
-
-
Constructor Summary
Constructors Constructor Description SimpleJob()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
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 interfaceScheduledJob
- 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
-
-