public class InvokableIteratorMethod extends InvokableMethod
The result is collected into a OutputCollector
as specified by the OperationMethod
annotation.
This proxy is used (instead of the default InvokableMethod
) when an operation is defining an output collector
in the OperationMethod
annotation so that iterable inputs are automatically handled by the chain executor.
This specialized implementation is declaring the same consume type as its non-iterable counterpart. But at runtime it consumes any Iterable of the cosume type.
To correctly generate the operation documentation the OperationTypeImpl
is checking if the method is iterable
or not through isIterable()
to declare the correct consume type.
Modifier and Type | Field and Description |
---|---|
protected Class<? extends OutputCollector> |
collector |
ADAPTABLE_PRIORITY, consume, EXACT_MATCH_PRIORITY, ISTANCE_OF_PRIORITY, log, method, op, priority, produce, USER_PRIORITY, VOID_PRIORITY
Constructor and Description |
---|
InvokableIteratorMethod(OperationType op,
Method method,
OperationMethod anno) |
Modifier and Type | Method and Description |
---|---|
protected Object |
doInvoke(OperationContext ctx,
Map<String,Object> args) |
int |
inputMatch(Class<?> in)
Return 0 for no match.
|
boolean |
isIterable() |
compareTo, getConsume, getInputType, getMethod, getOperation, getOutputType, getPriority, getProduce, invoke, toString
protected Class<? extends OutputCollector> collector
public InvokableIteratorMethod(OperationType op, Method method, OperationMethod anno)
public boolean isIterable()
isIterable
in class InvokableMethod
public int inputMatch(Class<?> in)
InvokableMethod
inputMatch
in class InvokableMethod
protected Object doInvoke(OperationContext ctx, Map<String,Object> args) throws OperationException, ReflectiveOperationException
doInvoke
in class InvokableMethod
OperationException
ReflectiveOperationException
Copyright © 2017 Nuxeo. All rights reserved.