Groovy Documentation

gpars.dataflow
[Groovy] Class DataCallback

java.lang.Object
  groovyx.gpars.actor.impl.MessageStream
      gpars.dataflow.DataCallback

final class DataCallback
extends MessageStream

A helper class enabling the 'whenBound()' functionality of a DataFlowVariable. An actor that waits asynchronously on the DFV to be bound. Once the DFV is bound, upon receiving the message the actor runs the supplied closure / code with the DFV value as a parameter.

Authors:
Vaclav Pech, Alex Tkachman Date: Sep 13, 2009


Constructor Summary
DataCallback(groovy.lang.Closure code)

@param code The closure to run

 
Method Summary
MessageStream send(Object message)

Sends a message back to the DataCallback.

 

Constructor Detail

DataCallback

DataCallback(groovy.lang.Closure code)
Parameters:
code - The closure to run


 
Method Detail

send

@Override
MessageStream send(Object message)
Sends a message back to the DataCallback. Will schedule processing the internal closure with the thread pool


 

Groovy Documentation