groovyx.gpars
Class DataFlowMessagingRunnable
java.lang.Object
  
groovy.lang.GroovyObjectSupport
      
groovy.lang.Closure
          
groovyx.gpars.DataFlowMessagingRunnable
- All Implemented Interfaces: 
 - groovy.lang.GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
 
public abstract class DataFlowMessagingRunnable
- extends groovy.lang.Closure
 
Represents a multi-argument Closure when using GPars dataflow operators and selectors through the Java API.
 The doRun() method is meant to be defined by implementers to specify the closure body.
- Author:
 
  - Vaclav Pech
 
- See Also:
 - Serialized Form
 
 
| Fields inherited from class groovy.lang.Closure | 
DELEGATE_FIRST, DELEGATE_ONLY, DONE, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF | 
 
 
| 
Method Summary | 
 java.lang.Object | 
call()
 
            | 
 java.lang.Object | 
call(java.lang.Object arguments)
 
            | 
 java.lang.Object | 
call(java.lang.Object[] args)
 
            | 
protected abstract  void | 
doRun(java.lang.Object[] arguments)
 
          Defines the action performed by the Runnable | 
 int | 
getMaximumNumberOfParameters()
 
            | 
 groovyx.gpars.dataflow.operator.DataFlowProcessor | 
getOwningProcessor()
 
          Retrieves the owning processor (operator or selector) giving the DataFlowMessagingRunnable a way to call methods like bindOutput() | 
 java.lang.Class[] | 
getParameterTypes()
 
          Returns types expected by the Runnable. | 
 
| Methods inherited from class groovy.lang.Closure | 
asWritable, clone, curry, getDelegate, getDirective, getOwner, getProperty, getResolveStrategy, getThisObject, isCase, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException | 
 
| 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 | 
 
serialVersionUID
private static final long serialVersionUID
- See Also:
 - Constant Field Values
 
defaultParamTypes
private final java.lang.Class[] defaultParamTypes
numberOfParameters
private final int numberOfParameters
DataFlowMessagingRunnable
protected DataFlowMessagingRunnable(int numberOfParameters)
DataFlowMessagingRunnable
protected DataFlowMessagingRunnable(java.lang.Object owner,
                                    int numberOfParameters)
getOwningProcessor
public groovyx.gpars.dataflow.operator.DataFlowProcessor getOwningProcessor()
- Retrieves the owning processor (operator or selector) giving the DataFlowMessagingRunnable a way to call methods like bindOutput()
- Returns:
 - The owning processor
 
 
 
getMaximumNumberOfParameters
public int getMaximumNumberOfParameters()
- Overrides:
 getMaximumNumberOfParameters in class groovy.lang.Closure
 
 
getParameterTypes
public java.lang.Class[] getParameterTypes()
- Returns types expected by the Runnable. By default instances of the Object class are demanded.
 The size of the array must match the numberOfParameters parameter to the constructor.
- Overrides:
 getParameterTypes in class groovy.lang.Closure
 
- Returns:
 - Types of expected arguments
 
 
 
call
public final java.lang.Object call()
- Overrides:
 call in class groovy.lang.Closure
 
 
call
public final java.lang.Object call(java.lang.Object[] args)
- Overrides:
 call in class groovy.lang.Closure
 
 
call
public final java.lang.Object call(java.lang.Object arguments)
- Overrides:
 call in class groovy.lang.Closure
 
 
doRun
protected abstract void doRun(java.lang.Object[] arguments)
- Defines the action performed by the Runnable
- Parameters:
 arguments - The parameters passed from the caller to the closure