|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norconex.jef.suite.JobSuite
public final class JobSuite
A job suite is an amalgamation of jobs, represented as a single executable unit. It can be seen as of one big job made of several sub-jobs. Configurations applied to a suite affects all jobs associated with the suite. All jobs making up a suite must have unique identifiers.
Constructor Summary | |
---|---|
JobSuite(IJob job)
Creates a new job suite using a FileLogManager and
a JobProgressPropertiesFileSerializer . |
|
JobSuite(IJob job,
IJobProgressSerializer progressSerializer)
Creates a new job suite using a FileLogManager . |
|
JobSuite(IJob job,
IJobProgressSerializer progressSerializer,
ILogManager logManager)
Creates a new job suite. |
|
JobSuite(IJob job,
IJobProgressSerializer progressSerializer,
ILogManager logManager,
IJobSuiteStopRequestHandler stopRequestAdviser)
Creates a new job suite. |
|
JobSuite(IJob job,
ILogManager logManager)
Creates a new job suite using a JobProgressPropertiesFileSerializer . |
Method Summary | |
---|---|
void |
accept(IJobSuiteVisitor visitor)
Accepts a job suite visitor. |
void |
accept(IJobSuiteVisitor visitor,
Class<IJob> jobFilterClass)
Accepts a job suite visitor, filtering jobs and job progresses to those of the same type as the specified job class instance. |
void |
addErrorHandler(IErrorHandler handler)
Adds an error handler. |
void |
addJobProgressListener(IJobProgressListener listener)
Adds a job progress listener. |
void |
addSuiteLifeCycleListener(ISuiteLifeCycleListener listener)
Adds a suite life cycle listener. |
void |
addSuiteStopRequestListener(ISuiteStopRequestListener listener)
Adds a job progress listener. |
static String |
getDefaultWorkDir()
Gets the default path to the JEF working directory for file-system related operations. |
IErrorHandler[] |
getErrorHandlers()
Gets all error handlers. |
IJob |
getJob(String jobId)
Gets the job instance matching the given job identifier. |
IJobContext |
getJobContext(IJob job)
|
IJobContext |
getJobContext(String jobId)
|
String[] |
getJobIds()
Gets all job identifiers in order provided by the suite hierarchy. |
IJobStatus |
getJobProgress(IJob job)
Gets the job progress associated with one of the suite's job. |
IJobStatus |
getJobProgress(String jobId)
Gets the job progress associated with one of the suite's job. |
IJobProgressListener[] |
getJobProgressListeners()
Gets all job progress listeners. |
IJobProgressSerializer |
getJobProgressSerializer()
Gets the job progress serializer. |
ILogManager |
getLogManager()
Gets the Log4J log manager. |
String |
getNamespace()
Gets the namespace (unique identifier) associated with this suite. |
IJob |
getRootJob()
Gets the suite root job. |
IJobSuiteStopRequestHandler |
getStopRequestHandler()
|
ISuiteLifeCycleListener[] |
getSuiteLifeCycleListeners()
Gets all suite life cycle listeners. |
IJobStatus.Status |
getSuiteStatus()
Gets the job suite status. |
ISuiteStopRequestListener[] |
getSuiteStopRequestListeners()
Gets all job progress listeners. |
void |
removeErrorHandler(IErrorHandler handler)
Removes an error handler. |
void |
removeJobProgressListener(IJobProgressListener listener)
Removes a job progress listener. |
void |
removeSuiteLifeCycleListener(ISuiteLifeCycleListener listener)
Removes a suite life cycle listener. |
void |
removeSuiteStopRequestListener(ISuiteStopRequestListener listener)
Removes a job progress listener. |
void |
stop()
Stops this job suite. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobSuite(IJob job)
FileLogManager
and
a JobProgressPropertiesFileSerializer
.
job
- root job for the suitepublic JobSuite(IJob job, IJobProgressSerializer progressSerializer)
FileLogManager
.
job
- root job for the suiteprogressSerializer
- job progress serializerpublic JobSuite(IJob job, ILogManager logManager)
JobProgressPropertiesFileSerializer
.
job
- root job for the suitelogManager
- Log4J log managerpublic JobSuite(IJob job, IJobProgressSerializer progressSerializer, ILogManager logManager)
job
- root job for the suiteprogressSerializer
- job progress serializerlogManager
- Log4J log managerpublic JobSuite(IJob job, IJobProgressSerializer progressSerializer, ILogManager logManager, IJobSuiteStopRequestHandler stopRequestAdviser)
job
- root job for the suiteprogressSerializer
- job progress serializerlogManager
- Log4J log managerMethod Detail |
---|
public IJobStatus.Status getSuiteStatus()
public IJob getRootJob()
public IJobContext getJobContext(String jobId)
public IJobContext getJobContext(IJob job)
public String[] getJobIds()
public IJobSuiteStopRequestHandler getStopRequestHandler()
public String getNamespace()
public void addJobProgressListener(IJobProgressListener listener)
listener
- job progress listener to addpublic void removeJobProgressListener(IJobProgressListener listener)
listener
- job progress listener to removepublic IJobProgressListener[] getJobProgressListeners()
public void addSuiteStopRequestListener(ISuiteStopRequestListener listener)
listener
- job progress listener to addpublic void removeSuiteStopRequestListener(ISuiteStopRequestListener listener)
listener
- job progress listener to removepublic ISuiteStopRequestListener[] getSuiteStopRequestListeners()
public void addSuiteLifeCycleListener(ISuiteLifeCycleListener listener)
listener
- suite life cycle listener to addpublic void removeSuiteLifeCycleListener(ISuiteLifeCycleListener listener)
listener
- suite life cycle listener to removepublic ISuiteLifeCycleListener[] getSuiteLifeCycleListeners()
public void addErrorHandler(IErrorHandler handler)
handler
- error handler to addpublic void removeErrorHandler(IErrorHandler handler)
handler
- error handler to removepublic IErrorHandler[] getErrorHandlers()
public IJobProgressSerializer getJobProgressSerializer()
public ILogManager getLogManager()
public IJobStatus getJobProgress(IJob job)
job
- the job for which to get its progress
public IJobStatus getJobProgress(String jobId)
jobId
- the job identifier of the job for which to get progress
public IJob getJob(String jobId)
jobId
- unique job identifier
public void stop()
public void accept(IJobSuiteVisitor visitor)
visitor
- job suite visitorpublic void accept(IJobSuiteVisitor visitor, Class<IJob> jobFilterClass)
visitor
- job suite visitorjobFilterClass
- type to filter jobs and job progressespublic static String getDefaultWorkDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |