groovyx.gpars.dataflow.impl
Class ThenMessagingRunnable<T,V>

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.lang.Closure
          extended by groovyx.gpars.MessagingRunnable<T>
              extended by groovyx.gpars.dataflow.impl.ThenMessagingRunnable<T,V>
All Implemented Interfaces:
groovy.lang.GroovyCallable, groovy.lang.GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.concurrent.Callable

public class ThenMessagingRunnable<T,V>
extends MessagingRunnable<T>

Author:
Vaclav Pech
See Also:
Serialized Form

Field Summary
private  groovy.lang.Closure<V> closure
           
private  groovy.lang.Closure<V> errorHandler
           
private  DataflowVariable<V> result
           
 
Fields inherited from class groovy.lang.Closure
DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF
 
Constructor Summary
ThenMessagingRunnable(DataflowVariable<V> result, groovy.lang.Closure<V> closure)
           
ThenMessagingRunnable(DataflowVariable<V> result, groovy.lang.Closure<V> closure, groovy.lang.Closure<V> errorHandler)
           
 
Method Summary
protected  void doRun(T argument)
          Defines the action performed by the Runnable
private  boolean shallHandle(groovy.lang.Closure<V> errorHandler, java.lang.Throwable e)
           
 
Methods inherited from class groovyx.gpars.MessagingRunnable
call, call, call, getMaximumNumberOfParameters, getParameterTypes
 
Methods inherited from class groovy.lang.Closure
asWritable, clone, curry, curry, dehydrate, getDelegate, getDirective, getOwner, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

private final DataflowVariable<V> result

closure

private final groovy.lang.Closure<V> closure

errorHandler

private final groovy.lang.Closure<V> errorHandler
Constructor Detail

ThenMessagingRunnable

public ThenMessagingRunnable(DataflowVariable<V> result,
                             groovy.lang.Closure<V> closure)

ThenMessagingRunnable

public ThenMessagingRunnable(DataflowVariable<V> result,
                             groovy.lang.Closure<V> closure,
                             groovy.lang.Closure<V> errorHandler)
Method Detail

doRun

protected void doRun(T argument)
Description copied from class: MessagingRunnable
Defines the action performed by the Runnable

Specified by:
doRun in class MessagingRunnable<T>
Parameters:
argument - The parameter passed from the caller to the closure

shallHandle

private boolean shallHandle(groovy.lang.Closure<V> errorHandler,
                            java.lang.Throwable e)

Copyright © 2008–2012 Václav Pech. All Rights Reserved.