groovyx.gpars.actor.impl
Class SequentialProcessingActor.MultiMessageReaction
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
groovyx.gpars.actor.impl.SequentialProcessingActor.MultiMessageReaction
- All Implemented Interfaces:
- groovy.lang.GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, org.codehaus.groovy.runtime.GeneratedClosure
- Enclosing class:
- SequentialProcessingActor
private final class SequentialProcessingActor.MultiMessageReaction
- extends groovy.lang.Closure
- implements org.codehaus.groovy.runtime.GeneratedClosure
Enables multiple argument closures to be passed to react().
The MultiMessageReaction class takes just one argument and will wrap the intended closure.
After invoking the MultiMessageReaction will curry the obtained value onto the wrapped multi-argument closure.
The whole process of wrapping a multi-argument closure with MultiMessageReaction class instances is repeated until all arguments
are curried. At that moment the original closure, now worth all arguments curried, gets invoked.
- Author:
- Vaclav Pech
Fields inherited from class groovy.lang.Closure |
DELEGATE_FIRST, DELEGATE_ONLY, DONE, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF |
Methods inherited from class groovy.lang.Closure |
asWritable, call, call, call, 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
code
private final groovy.lang.Closure code
maxNumberOfParameters
private final int maxNumberOfParameters
timeout
private final long timeout
localSenders
private final java.util.List<MessageStream> localSenders
SequentialProcessingActor.MultiMessageReaction
private SequentialProcessingActor.MultiMessageReaction(groovy.lang.Closure code,
int maxNumberOfParameters,
long timeout,
java.util.List<MessageStream> localSenders)
getMaximumNumberOfParameters
public int getMaximumNumberOfParameters()
- Overrides:
getMaximumNumberOfParameters
in class groovy.lang.Closure
getParameterTypes
public java.lang.Class<?>[] getParameterTypes()
- Overrides:
getParameterTypes
in class groovy.lang.Closure
doCall
public java.lang.Object doCall(java.lang.Object args)