ch.javasoft.job
Interface JobTerminationHandler<R>

Type Parameters:
R - Result type of the job after successful termination

public interface JobTerminationHandler<R>

A JobTerminationHandler can be registered with a JobProcessor and is notified when jobs terminate, regularly or exceptional.
Note: the notification methods of a job termination handler should be exception safe, i.e. all exceptions should be caught and handled. If an exception is thrown during notification, it is wrapped within an UncaughtJobTerminationHandlerException and rethrown, i.e. job execution aborts.


Method Summary
 void terminated(Job job, R result)
          Notification method for successful job execution termination.
 void terminatedByException(Job job, Throwable exception)
          Notification method for exceptional job execution termination Note: this method should not throw exceptions, see class comments.
 

Method Detail

terminated

void terminated(Job job,
                R result)
Notification method for successful job execution termination. Note: this method should not throw exceptions, see class comments.

Parameters:
job - The concerned job
result - The outcome of the job execution

terminatedByException

void terminatedByException(Job job,
                           Throwable exception)
Notification method for exceptional job execution termination Note: this method should not throw exceptions, see class comments.

Parameters:
job - The concerned job
exception - The exception which caused the abnormal termination