it.sauronsoftware.cron4j
Interface TaskExecutorListener


public interface TaskExecutorListener

A TaskExecutorListener is notified with events from a TaskExecutor. You can add listeners to a TaskExecutor by calling its TaskExecutor.addTaskExecutorListener(TaskExecutorListener) method.

Since:
2.0
Author:
Carlo Pelliccia
See Also:
TaskExecutor

Method Summary
 void completenessValueChanged(TaskExecutor executor, double completenessValue)
          Called every time the execution completeness value changes.
 void executionPausing(TaskExecutor executor)
          Called when the execution has been requested to be paused.
 void executionResuming(TaskExecutor executor)
          Called when the execution has been requested to be resumed.
 void executionStopping(TaskExecutor executor)
          Called when the executor has been requested to be stopped.
 void executionTerminated(TaskExecutor executor, java.lang.Throwable exception)
          Called at execution end.
 void statusMessageChanged(TaskExecutor executor, java.lang.String statusMessage)
          Called every time the execution status message changes.
 

Method Detail

executionPausing

void executionPausing(TaskExecutor executor)
Called when the execution has been requested to be paused.

Parameters:
executor - The source executor.

executionResuming

void executionResuming(TaskExecutor executor)
Called when the execution has been requested to be resumed.

Parameters:
executor - The source executor.

executionStopping

void executionStopping(TaskExecutor executor)
Called when the executor has been requested to be stopped.

Parameters:
executor - The source executor.

executionTerminated

void executionTerminated(TaskExecutor executor,
                         java.lang.Throwable exception)
Called at execution end. If the execution has failed due to an error, the encountered exception is reported.

Parameters:
executor - The source executor.
exception - If the execution has been terminated due to an error, this is the encountered exception; otherwise the parameter is null.

statusMessageChanged

void statusMessageChanged(TaskExecutor executor,
                          java.lang.String statusMessage)
Called every time the execution status message changes.

Parameters:
executor - The source executor.
statusMessage - The new status message.

completenessValueChanged

void completenessValueChanged(TaskExecutor executor,
                              double completenessValue)
Called every time the execution completeness value changes.

Parameters:
executor - The source executor.
completenessValue - The new completeness value.