Package com.netscape.certsrv.jobs
Interface IJob
- All Known Implementing Classes:
AJobBase
,RequestInQueueJob
public interface IJob
An interface to be implemented from for a job to be scheduled by
the Jobs Scheduler.
- Version:
- $Revision$, $Date$
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns a list of configuration parameter names.Gets the configuration substore used by this jobgetId()
get instance id.gets the plugin name of this job.get cron string associated with this jobvoid
init
(ISubsystem owner, String id, String implName, ConfigStore config) Initialize from the configuration file.boolean
tells if the job is enabledboolean
Check whether the job has been asked to stop.void
set instance id.void
stop()
Request the job to stop gracefully.
-
Method Details
-
init
Initialize from the configuration file.- Parameters:
id
- String name of this instanceimplName
- string name of this implementationconfig
- configuration store for this instance- Throws:
EBaseException
- any initilization failure
-
isEnabled
boolean isEnabled()tells if the job is enabled- Returns:
- a boolean value indicating whether the job is enabled or not
-
setId
set instance id.- Parameters:
id
- String id of the instance
-
getId
String getId()get instance id.- Returns:
- a String identifier
-
getJobCron
IJobCron getJobCron()get cron string associated with this job- Returns:
- a JobCron object that represents the schedule of this job
-
getConfigParams
String[] getConfigParams()Returns a list of configuration parameter names. The list is passed to the configuration console so instances of this implementation can be configured through the console.- Returns:
- String array of configuration parameter names.
-
getImplName
String getImplName()gets the plugin name of this job.- Returns:
- a String that is the name of this implementation
-
getConfigStore
ConfigStore getConfigStore()Gets the configuration substore used by this job- Returns:
- configuration store
-
stop
void stop()Request the job to stop gracefully. The job may not stop immediately. -
isStopped
boolean isStopped()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.
-