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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleJob
public SimpleJob()
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-2011 The Apache Software Foundation. All Rights Reserved.