Groovy Documentation

gpars.dataflow
Class DataCallback

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

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.

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


Constructor Summary
DataCallback(groovy.lang.Closure code)

 
Method Summary
MessageStream send(Object message)

Sends a message back to the DataCallback.

 

Constructor Detail

DataCallback

public DataCallback(groovy.lang.Closure code)
param:
code The closure to run


 
Method Detail

send

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


 

Groovy Documentation