Package org.jvnet.hudson.reactor
Class ReactorListener.Aggregator
- java.lang.Object
-
- org.jvnet.hudson.reactor.ReactorListener.Aggregator
-
- All Implemented Interfaces:
ReactorListener
- Enclosing interface:
- ReactorListener
public static class ReactorListener.Aggregator extends Object implements ReactorListener
Bundles multiple listeners into one.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jvnet.hudson.reactor.ReactorListener
ReactorListener.Aggregator
-
-
Field Summary
-
Fields inherited from interface org.jvnet.hudson.reactor.ReactorListener
NOOP
-
-
Constructor Summary
Constructors Constructor Description Aggregator(Collection<ReactorListener> listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, 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.
-
-
-
Constructor Detail
-
Aggregator
public Aggregator(Collection<ReactorListener> listeners)
-
-
Method Detail
-
onTaskStarted
public void onTaskStarted(Task t)
Description copied from interface:ReactorListener
Notifies that the execution of the task is about to start.- Specified by:
onTaskStarted
in interfaceReactorListener
-
onTaskCompleted
public void onTaskCompleted(Task t)
Description copied from interface:ReactorListener
Notifies that the execution of the task is about to finish. This happens on the same thread that calledReactorListener.onTaskStarted(Task)
.- Specified by:
onTaskCompleted
in interfaceReactorListener
-
onTaskFailed
public void onTaskFailed(Task t, Throwable err, boolean fatal)
Description copied from interface:ReactorListener
Notifies that the execution of the task have failed with an exception.- Specified by:
onTaskFailed
in interfaceReactorListener
err
- EitherError
orException
, 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
public void onAttained(Milestone milestone)
Description copied from interface:ReactorListener
Indicates that the following milestone was attained.- Specified by:
onAttained
in interfaceReactorListener
-
-