cascading.cascade
Interface CascadeListener


public interface CascadeListener

Interface CascadeListener provides hooks for receiving events on various stages of a Cascade execution.

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


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

Method Detail

onStarting

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

Parameters:
cascade - the current Cascade

onStopping

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

Parameters:
cascade - the current Cascade

onCompleted

void onCompleted(Cascade cascade)
The onCompleted event is fired when a Cascade 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:
cascade - the current Cascade

onThrowable

boolean onThrowable(Cascade cascade,
                    Throwable throwable)
The onThrowable event is fired if any child Flow 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 Cascade.complete() method.

Parameters:
cascade - the current Cascade
throwable - the current error
Returns:
returns true if this listener has handled the given throwable


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