Groovy Documentation

gpars.actor
Class ReactiveActor

java.lang.Object
  groovyx.gpars.actor.impl.RunnableBackedPooledActor
      gpars.actor.ReactiveActor

class ReactiveActor
extends RunnableBackedPooledActor

An actor representing a reactor. When it receives a message, the supplied block of code is run with the message as a parameter and the result of the code is send in reply.

 final def doubler = reactor {message ->
     2 * message
}*
 def result = doubler.sendAndWait(10)

 
author:
Vaclav Pech, Alex Tkachman Date: Jun 26, 2009


Constructor Summary
ReactiveActor(groovy.lang.Closure body)

 

Constructor Detail

ReactiveActor

public ReactiveActor(groovy.lang.Closure body)


 

Groovy Documentation