NoopTask: Fix things that should be static. Add simple factory method.

This commit is contained in:
Gian Merlino 2013-12-20 08:56:17 -08:00
parent 3dd9a25546
commit 0ee6136ea3
1 changed files with 8 additions and 3 deletions

View File

@ -35,9 +35,9 @@ import org.joda.time.DateTime;
public class NoopTask extends AbstractTask public class NoopTask extends AbstractTask
{ {
private static final Logger log = new Logger(NoopTask.class); private static final Logger log = new Logger(NoopTask.class);
private static int defaultRunTime = 2500; private static final int defaultRunTime = 2500;
private static int defaultIsReadyTime = 0; private static final int defaultIsReadyTime = 0;
private static IsReadyResult defaultIsReadyResult = IsReadyResult.YES; private static final IsReadyResult defaultIsReadyResult = IsReadyResult.YES;
enum IsReadyResult enum IsReadyResult
{ {
@ -139,4 +139,9 @@ public class NoopTask extends AbstractTask
log.info("Woke up!"); log.info("Woke up!");
return TaskStatus.success(getId()); return TaskStatus.success(getId());
} }
public static NoopTask create()
{
return new NoopTask(null, 0, 0, null, null);
}
} }