Class StreamFunctionExecutor<C>

  • Type Parameters:
    C - the context type
    All Implemented Interfaces:
    io.micronaut.context.ApplicationContextProvider, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    FunctionApplication

    public class StreamFunctionExecutor<C>
    extends AbstractExecutor<C>

    A base function executor for handling input and output as streams

    .
    Since:
    1.0
    • Constructor Detail

      • StreamFunctionExecutor

        public StreamFunctionExecutor()
    • Method Detail

      • execute

        public void execute​(java.io.InputStream input,
                            java.io.OutputStream output)
                     throws java.io.IOException
        Execute the function for the given input and output.
        Parameters:
        input - The input
        output - The output
        Throws:
        java.io.IOException - If an I/O exception occurs
      • execute

        protected void execute​(java.io.InputStream input,
                               java.io.OutputStream output,
                               C context)
                        throws java.io.IOException
        Execute the function with given context object.
        Parameters:
        input - The InputStream
        output - THe OutputStream
        context - The context object
        Throws:
        java.io.IOException - If an error occurs