cascading.flow
Interface FlowListener


public interface FlowListener

Interface FlowListener provides hooks for receiving events on various stages of a Flow execution.

Any RuntimeException thrown from any of the listener methods will force the given flow to stop by calling Flow.stop().


Method Summary
 void onCompleted(Flow flow)
          The onCompleted event is fired when a Flow instance has completed all work whether if was success or failed.
 void onStarting(Flow flow)
          The onStarting event is fired when a Flow instance receives the start() message.
 void onStopping(Flow flow)
          The onStopping event is fired when a Flow instance receives the stop() message.
 boolean onThrowable(Flow flow, Throwable throwable)
          The onThrowable event is fired if any child FlowStep throws a Throwable type.
 

Method Detail

onStarting

void onStarting(Flow flow)
The onStarting event is fired when a Flow instance receives the start() message.

Parameters:
flow -

onStopping

void onStopping(Flow flow)
The onStopping event is fired when a Flow instance receives the stop() message.

Parameters:
flow -

onCompleted

void onCompleted(Flow flow)
The onCompleted event is fired when a Flow instance has completed all work whether if was success or failed. If there was a thrown exception, onThrowable will be fired before this event.

Parameters:
flow -

onThrowable

boolean onThrowable(Flow flow,
                    Throwable throwable)
The onThrowable event is fired if any child FlowStep throws a Throwable type. This throwable is passed as an argument to the event. This event method should return true if the given throwable was handled and should not be rethrown from the Flow.complete() method.

Parameters:
flow -
throwable -
Returns:
returns true if this listener has handled the given throwable


Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.