org.jvnet.hudson.reactor
Interface ReactorListener

All Known Implementing Classes:
ReactorListener.Aggregator

public interface ReactorListener

Receives callback during the Reactor.execute(Executor, ReactorListener). The callback happens by using the threads of Executor, which means these callbacks can occur concurrently. The callee is responsible for synchronization, if that's desired.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class ReactorListener.Aggregator
          Bundles multiple listeners into one.
 
Field Summary
static ReactorListener NOOP
           
 
Method Summary
 void onAttained(Milestone milestone)
          Indicates that the following milestone was attained.
 void onTaskCompleted(Task t)
          Notifies that the execution of the task is about to finish.
 void onTaskFailed(Task t, java.lang.Throwable err, boolean fatal)
          Notifies that the execution of the task have failed with an exception.
 void onTaskStarted(Task t)
          Notifies that the execution of the task is about to start.
 

Field Detail

NOOP

static final ReactorListener NOOP
Method Detail

onTaskStarted

void onTaskStarted(Task t)
Notifies that the execution of the task is about to start.


onTaskCompleted

void onTaskCompleted(Task t)
Notifies that the execution of the task is about to finish. This happens on the same thread that called onTaskStarted(Task).


onTaskFailed

void onTaskFailed(Task t,
                  java.lang.Throwable err,
                  boolean fatal)
Notifies that the execution of the task have failed with an exception.

Parameters:
err - Either Error or Exception, indicating the cause of the failure.
fatal - If true, this problem is fatal, and the reactor is going to terminate. If false, the reactor will continue executing after this failure.

onAttained

void onAttained(Milestone milestone)
Indicates that the following milestone was attained.



Copyright © 2011. All Rights Reserved.