cascading.flow
Class LockingFlowListener

java.lang.Object
  extended by cascading.flow.LockingFlowListener
All Implemented Interfaces:
FlowListener
Direct Known Subclasses:
FailingFlowListener

public class LockingFlowListener
extends Object
implements FlowListener


Field Summary
 Semaphore completed
           
 Semaphore started
           
 Semaphore stopped
           
 Semaphore thrown
           
 
Constructor Summary
LockingFlowListener()
           
 
Method Summary
static Map<String,Callable<Throwable>> getJobsMap(Flow flow)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

started

public Semaphore started

stopped

public Semaphore stopped

completed

public Semaphore completed

thrown

public Semaphore thrown
Constructor Detail

LockingFlowListener

public LockingFlowListener()
Method Detail

getJobsMap

public static Map<String,Callable<Throwable>> getJobsMap(Flow flow)

onStarting

public void onStarting(Flow flow)
Description copied from interface: FlowListener
The onStarting event is fired when a Flow instance receives the start() message.

Specified by:
onStarting in interface FlowListener

onStopping

public void onStopping(Flow flow)
Description copied from interface: FlowListener
The onStopping event is fired when a Flow instance receives the stop() message.

Specified by:
onStopping in interface FlowListener

onCompleted

public void onCompleted(Flow flow)
Description copied from interface: FlowListener
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.

Specified by:
onCompleted in interface FlowListener

onThrowable

public boolean onThrowable(Flow flow,
                           Throwable throwable)
Description copied from interface: FlowListener
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.

Specified by:
onThrowable in interface FlowListener
Returns:
returns true if this listener has handled the given throwable


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