Package io.micronaut.function.executor
Class StreamFunctionExecutor<C>
java.lang.Object
io.micronaut.function.executor.AbstractExecutor<C>
io.micronaut.function.executor.StreamFunctionExecutor<C>
- Type Parameters:
C
- the context type
- All Implemented Interfaces:
ApplicationContextProvider
,Closeable
,AutoCloseable
- Direct Known Subclasses:
FunctionApplication
A base function executor for handling input and output as streams
.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from class io.micronaut.function.executor.AbstractExecutor
applicationContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(InputStream input, OutputStream output) Execute the function for the given input and output.protected void
execute
(InputStream input, OutputStream output, C context) Execute the function with given context object.Methods inherited from class io.micronaut.function.executor.AbstractExecutor
buildApplicationContext, close, getApplicationContext, newApplicationContextBuilder, resolveFunction, resolveFunctionName, startEnvironment
-
Constructor Details
-
StreamFunctionExecutor
public StreamFunctionExecutor()
-
-
Method Details
-
execute
Execute the function for the given input and output.- Parameters:
input
- The inputoutput
- The output- Throws:
IOException
- If an I/O exception occurs
-
execute
Execute the function with given context object.- Parameters:
input
- TheInputStream
output
- THeOutputStream
context
- The context object- Throws:
IOException
- If an error occurs
-