groovyx.gpars.dataflow.impl
Class SelectCallback<T>

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.lang.Closure
          extended by groovyx.gpars.dataflow.impl.SelectCallback<T>
All Implemented Interfaces:
groovy.lang.GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable

public final class SelectCallback<T>
extends groovy.lang.Closure

A closure registered with all the input channels on the wheneverBound() event to inform the Select about a value being available in a particular channel.

Author:
Vaclav Pech Date: 30th Sep 2010
See Also:
Serialized Form

Field Summary
private  DataflowReadChannel<? extends T> channel
           
private  int index
           
private static long serialVersionUID
           
 
Fields inherited from class groovy.lang.Closure
DELEGATE_FIRST, DELEGATE_ONLY, DONE, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF
 
Constructor Summary
SelectCallback(java.lang.Object owner, int index, DataflowReadChannel<? extends T> channel)
           
 
Method Summary
 java.lang.Object call(java.lang.Object[] args)
          Invoked by the channel when a value has been bound to it and is available for consumption
 
Methods inherited from class groovy.lang.Closure
asWritable, call, call, clone, curry, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, ncurry, rcurry, 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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

index

private final int index

channel

private final DataflowReadChannel<? extends T> channel
Constructor Detail

SelectCallback

public SelectCallback(java.lang.Object owner,
                      int index,
                      DataflowReadChannel<? extends T> channel)
Parameters:
owner - The SelectBase instance to notify
index - The index of the channel this SelectCallback instance represents
channel - The channel represented by this SelectCallback instance
Method Detail

call

public java.lang.Object call(java.lang.Object[] args)
Invoked by the channel when a value has been bound to it and is available for consumption

Overrides:
call in class groovy.lang.Closure
Parameters:
args - Holds the value, but we do not work with the value here
Returns:
A dummy string, since the caller doesn't check the return value

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