public class FunctionApplication extends StreamFunctionExecutor
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationContext |
applicationContext
The current
ApplicationContext. |
static java.lang.String |
DATA_OPTION
The data option.
|
static java.lang.String |
DEBUG_OPTIONS
The debug option.
|
| Constructor and Description |
|---|
FunctionApplication() |
| Modifier and Type | Method and Description |
|---|---|
protected ApplicationContext |
buildApplicationContext(C context) |
void |
close() |
ApplicationContext |
getApplicationContext()
Resolves the
ApplicationContext for this class. |
static void |
main(java.lang.String... args)
The main method which is the entry point.
|
protected ApplicationContextBuilder |
newApplicationContextBuilder()
Builds a new builder.
|
protected ExecutableMethod<java.lang.Object,java.lang.Object> |
resolveFunction(LocalFunctionRegistry localFunctionRegistry,
java.lang.String functionName)
Resolve a function from the
LocalFunctionRegistry. |
protected java.lang.String |
resolveFunctionName(Environment env)
Resolves the function name to execution for the environment.
|
static void |
run(StreamFunctionExecutor functionExecutor,
java.lang.String... args)
Run the given
StreamFunctionExecutor for the given arguments. |
protected Environment |
startEnvironment(ApplicationContext applicationContext)
Start the environment specified.
|
execute, executepublic static final java.lang.String DATA_OPTION
public static final java.lang.String DEBUG_OPTIONS
protected ApplicationContext applicationContext
ApplicationContext.public static void main(java.lang.String... args)
args - The argumentspublic static void run(StreamFunctionExecutor functionExecutor, java.lang.String... args)
StreamFunctionExecutor for the given arguments.functionExecutor - The function executorargs - The argumentsprotected ExecutableMethod<java.lang.Object,java.lang.Object> resolveFunction(LocalFunctionRegistry localFunctionRegistry, java.lang.String functionName)
LocalFunctionRegistry.localFunctionRegistry - The LocalFunctionRegistryfunctionName - The function nameprotected java.lang.String resolveFunctionName(Environment env)
env - The environmentprotected ApplicationContext buildApplicationContext(@Nullable C context)
context - A platform specific context objectApplicationContext to use@NonNull protected ApplicationContextBuilder newApplicationContextBuilder()
ApplicationContextBuilderprotected Environment startEnvironment(ApplicationContext applicationContext)
applicationContext - the application context with the environmentpublic ApplicationContext getApplicationContext()
ApplicationContextProviderApplicationContext for this class.getApplicationContext in interface ApplicationContextProviderApplicationContext@PreDestroy
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException