Package com.netscape.cms.jobs
Class AJobBase
java.lang.Object
com.netscape.cms.jobs.AJobBase
- Direct Known Subclasses:
RequestInQueueJob
This abstract class is a base job for real job extentions for the
Jobs Scheduler.
- Version:
- $Revision$, $Date$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Logger
protected ConfigStore
protected static String[]
protected String
protected String
protected String
protected String
protected IJobCron
protected String
protected boolean
protected String
protected String
protected String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildContentParams
(String name, String val) protected void
protected void
buildItemParams
(String name, String val) protected void
buildItemParams
(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) Gets the configuration substore used by this jobgetId()
get instance id.gets the plugin name of this job.get cron string associated with this jobprotected String
getTemplateContent
(String templatePath) abstract void
init
(ISubsystem owner, String id, String implName, ConfigStore config) abstract methodsboolean
tells if the job is enabledboolean
Check whether the job has been asked to stop.protected void
mailSummary
(String content) abstract void
run()
void
set instance id.void
stop()
Request the job to stop gracefully.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.netscape.certsrv.jobs.IJob
getConfigParams
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_SUMMARY
- See Also:
-
PROP_ENABLED
- See Also:
-
PROP_EMAIL_SUBJECT
- See Also:
-
PROP_EMAIL_TEMPLATE
- See Also:
-
PROP_ITEM_TEMPLATE
- See Also:
-
PROP_SENDER_EMAIL
- See Also:
-
PROP_RECEIVER_EMAIL
- See Also:
-
STATUS_FAILURE
- See Also:
-
STATUS_SUCCESS
- See Also:
-
mImplName
-
mConfig
-
mId
-
mCron
-
mJobCron
-
mConfigParams
-
mSummaryMailSubject
-
mMailHTML
protected boolean mMailHTML -
mMailForm
-
mItemForm
-
mSummarySenderEmail
-
mSummaryReceiverEmail
-
mContentParams
-
mItemParams
-
-
Constructor Details
-
AJobBase
public AJobBase()
-
-
Method Details
-
isEnabled
public boolean isEnabled()tells if the job is enabled -
init
public abstract void init(ISubsystem owner, String id, String implName, ConfigStore config) throws EBaseException abstract methods- Specified by:
init
in interfaceIJob
id
- String name of this instanceimplName
- string name of this implementationconfig
- configuration store for this instance- Throws:
EBaseException
- any initilization failure
-
run
public abstract void run() -
getId
get instance id. -
setId
set instance id. -
getJobCron
get cron string associated with this job- Specified by:
getJobCron
in interfaceIJob
- Returns:
- a JobCron object that represents the schedule of this job
-
getImplName
gets the plugin name of this job.- Specified by:
getImplName
in interfaceIJob
- Returns:
- a String that is the name of this implementation
-
getConfigStore
Gets the configuration substore used by this job- Specified by:
getConfigStore
in interfaceIJob
- Returns:
- configuration store
-
getTemplateContent
-
mailSummary
-
buildItemParams
protected void buildItemParams(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) -
buildItemParams
-
buildItemParams
-
buildContentParams
-
stop
public void stop()Description copied from interface:IJob
Request the job to stop gracefully. The job may not stop immediately. -
isStopped
public boolean isStopped()Description copied from interface:IJob
Check whether the job has been asked to stop. Long running jobs should call this method occasionally inside the run() method and exit gracefully if it returns true.
-