Class InvokableIteratorMethod

  • All Implemented Interfaces:

    public class InvokableIteratorMethod
    extends InvokableMethod
    A method proxy which accept as input only iterable inputs. At invocation time it iterates over the input elements and invoke the real method using the current input element as the input.

    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.

    Bogdan Stefanescu