Package tenapull.run
Class ReformatOutput
java.lang.Object
tenapull.run.Job
tenapull.run.ReformatOutput
public class ReformatOutput extends Job
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OUTPUT_DIR
static java.lang.Integer
TRUNCATE
-
Constructor Summary
Constructors Constructor Description ReformatOutput(java.io.File file)
-
Method Summary
Modifier and Type Method Description protected boolean
exceptionHandler(java.lang.Exception e, Job.Stage stage)
Handles any exceptions thrown by isReady, fetch, process, and output methods.protected void
fetch(NessusClient client)
Fetch any API resources, using the NessusClient provided by the worker thread.protected boolean
isReady()
Is ready boolean.protected void
output()
Perform any outputting of the processed data The job will remain in the OUTPUT stage until fetch returns without an exception, or the job is marked as failed.protected void
process()
Perform any processing of the fetched data The job will remain in the PROCESS stage until fetch returns without an exception, or the job is marked as failed.Methods inherited from class tenapull.run.Job
addJob, addJobs, equals, failed, getAccessor, getStage, notifyOfExit, start, tryAgainIn, waitForExit
-
Field Details
-
OUTPUT_DIR
public static final java.lang.String OUTPUT_DIR -
TRUNCATE
public static final java.lang.Integer TRUNCATE
-
-
Constructor Details
-
ReformatOutput
public ReformatOutput(java.io.File file) throws java.lang.NullPointerException- Throws:
java.lang.NullPointerException
-
-
Method Details
-
isReady
protected boolean isReady()Description copied from class:Job
Is ready boolean. Indicates whether the job is ready to run yet. If false is returned, the job will be placed in the JobFactory's waitingJobs queue, with either the default wait time, or another wait time if a new one is set before returning false from isReady. The job will remain in the IDLE stage until isReady returns true, or the job is marked as failed. Failed jobs are not marked as DONE until after the method has returned -
fetch
Description copied from class:Job
Fetch any API resources, using the NessusClient provided by the worker thread. The job will remain in the FETCH stage until fetch returns without an exception, or the job is marked as failed. Failed jobs are not marked as DONE until after the method has returned -
process
protected void process() throws java.lang.ExceptionDescription copied from class:Job
Perform any processing of the fetched data The job will remain in the PROCESS stage until fetch returns without an exception, or the job is marked as failed. Failed jobs are not marked as DONE until after the method has returned -
output
protected void output() throws java.lang.ExceptionDescription copied from class:Job
Perform any outputting of the processed data The job will remain in the OUTPUT stage until fetch returns without an exception, or the job is marked as failed. Failed jobs are not marked as DONE until after the method has returned -
exceptionHandler
Description copied from class:Job
Handles any exceptions thrown by isReady, fetch, process, and output methods. Return true if the operation should be attempted again immediately. Mark as failed to permanently end the job. Otherwise, the job will be placed in the delayedJobs queue, and put back into readyJobs once its wait time is up- Specified by:
exceptionHandler
in classJob
- Parameters:
e
- the estage
- the stage- Returns:
- the boolean
-