Package com.saxonica.ee.stream.feed

## Class CallableFeed

- java.lang.Object
- - net.sf.saxon.event.Outputter
  - - net.sf.saxon.event.ProxyOutputter
    - - com.saxonica.ee.stream.feed.ItemFeed
      - - com.saxonica.ee.stream.feed.CallableFeed

- All Implemented Interfaces:
    `javax.xml.transform.Result`, `Receiver`

      public class CallableFeed
      extends ItemFeed

  A CallableFeed is used to wrap an expression that does (a) not have intrinsic capability to accept streamed input, and (b) does not expect any operand to be a sequence, and (c) implements the Callable interface.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.event.Outputter

      `pipelineConfiguration, systemId`

    - ### Fields inherited from interface javax.xml.transform.Result

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CallableFeed​(Callable function, ItemFeed result, XPathContext context, Expression[] arguments)` | Create a Feed that evaluates a Callable (often but not necessarily a function)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `append​(Item item)` | Supply an item to the feed
    `void` | `close()` | Finish evaluating the expression.

    - ### Methods inherited from class com.saxonica.ee.stream.feed.ItemFeed

      `append, dynamicError, endSelectedParentNode, getContext, getExpression, getResult, getTerminator, hasFailed, open, processItems, setExpression, setHasFailed, setTerminator, startSelectedParentNode`

    - ### Methods inherited from class net.sf.saxon.event.ProxyOutputter

      `attribute, characters, comment, endDocument, endElement, getNextOutputter, namespace, open, processingInstruction, setLocation, setUnparsedEntity, startContent, startDocument, startElement, startElement, usesTypeAnnotations`

    - ### Methods inherited from class net.sf.saxon.event.Outputter

      `getConfiguration, getPipelineConfiguration, getStringReceiver, getSystemId, namespaces, setPipelineConfiguration, setSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.event.Receiver

      `handlesAppend`

- - ### Constructor Detail

    - #### CallableFeed

          public CallableFeed​(Callable function,
                              ItemFeed result,
                              XPathContext context,
                              Expression[] arguments)

      Create a Feed that evaluates a Callable (often but not necessarily a function)
      Parameters:
        `function` - the function or other Callable
        `result` - the place to send the results of evaluating this Callable
        `context` - dynamic context information
        `arguments` - the arguments to the Callable. Typically one of these is Consuming. The expression receives its input for the consuming argument via the processItem() call, and it then evaluates the other (non-streamed) arguments by calling iterate() on them.

  - ### Method Detail

    - #### append

          public void append​(Item item)
                      throws XPathException

      Supply an item to the feed
      Specified by:
        `append` in interface `Receiver`
      Specified by:
        `append` in class `ItemFeed`
      Parameters:
        `item` - the item being fed
      Throws:
        `XPathException` - to report any failure

    - #### close

          public void close()
                     throws XPathException

      Description copied from class: `ItemFeed`
      Finish evaluating the expression.
      Specified by:
        `close` in interface `Receiver`
      Overrides:
        `close` in class `ItemFeed`
      Throws:
        `XPathException` - if a dynamic error occurs