org.wiperdog.jobmanager.internal
Class AbstractGenericJob

java.lang.Object
  extended by org.wiperdog.jobmanager.internal.AbstractGenericJob
All Implemented Interfaces:
org.quartz.InterruptableJob, org.quartz.Job
Direct Known Subclasses:
CommanderJob, JavaJob, JobTerminateJob, ObjectJob, ShellJob

public abstract class AbstractGenericJob
extends Object
implements org.quartz.InterruptableJob

Author:
kurohara

Nested Class Summary
static class AbstractGenericJob.SuicideJob
          Job for suicide.
 
Field Summary
static int DEF_MAX_HISTORYDEPTH
           
static String KEY_MAXRUNTIME
           
protected  String lastMsg
           
protected  org.apache.log4j.Logger logger
           
protected  Thread me
           
 
Constructor Summary
AbstractGenericJob()
           
 
Method Summary
protected abstract  Object doJob(org.quartz.JobExecutionContext context)
           
 void execute(org.quartz.JobExecutionContext context)
           
 void interrupt()
           
protected  void setFailed(org.quartz.JobDataMap data)
           
protected  void setFailed(org.quartz.JobExecutionContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_MAXRUNTIME

public static final String KEY_MAXRUNTIME
See Also:
Constant Field Values

DEF_MAX_HISTORYDEPTH

public static final int DEF_MAX_HISTORYDEPTH
See Also:
Constant Field Values

me

protected Thread me

lastMsg

protected String lastMsg

logger

protected org.apache.log4j.Logger logger
Constructor Detail

AbstractGenericJob

public AbstractGenericJob()
Method Detail

doJob

protected abstract Object doJob(org.quartz.JobExecutionContext context)
                         throws Throwable
Throws:
Throwable

setFailed

protected final void setFailed(org.quartz.JobExecutionContext context)

setFailed

protected final void setFailed(org.quartz.JobDataMap data)

execute

public final void execute(org.quartz.JobExecutionContext context)
                   throws org.quartz.JobExecutionException
Specified by:
execute in interface org.quartz.Job
Throws:
org.quartz.JobExecutionException

interrupt

public void interrupt()
               throws org.quartz.UnableToInterruptJobException
Specified by:
interrupt in interface org.quartz.InterruptableJob
Throws:
org.quartz.UnableToInterruptJobException


Copyright © 2013. All Rights Reserved.