public class FunctionInitializer extends AbstractExecutor
Modifier and Type | Class and Description |
---|---|
class |
FunctionInitializer.ParseContext
The parse context supplied from the
run(String[], Function) method. |
Modifier and Type | Field and Description |
---|---|
protected boolean |
closeContext |
applicationContext
Modifier | Constructor and Description |
---|---|
|
FunctionInitializer()
Constructor.
|
protected |
FunctionInitializer(ApplicationContext applicationContext)
Start a function for an existing
ApplicationContext . |
protected |
FunctionInitializer(ApplicationContext applicationContext,
boolean inject)
Start a function for an existing
ApplicationContext . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
injectThis(ApplicationContext applicationContext)
Injects this instance.
|
void |
run(String[] args,
Function<FunctionInitializer.ParseContext,?> supplier)
This method is designed to be called when using the
FunctionInitializer from a static Application main method. |
protected void |
startThis(ApplicationContext applicationContext)
Start this environment.
|
buildApplicationContext, getApplicationContext, newApplicationContextBuilder, resolveFunction, resolveFunctionName, startEnvironment
public FunctionInitializer()
protected FunctionInitializer(ApplicationContext applicationContext)
ApplicationContext
.applicationContext
- The application contextprotected FunctionInitializer(ApplicationContext applicationContext, boolean inject)
ApplicationContext
.applicationContext
- The application contextinject
- inject this into the application flag@Internal public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractExecutor
IOException
public void run(String[] args, Function<FunctionInitializer.ParseContext,?> supplier) throws IOException
FunctionInitializer
from a static Application main method.args
- The arguments passed to mainsupplier
- The function that executes this functionIOException
- If an error occursprotected void startThis(ApplicationContext applicationContext)
applicationContext
- The application contextprotected void injectThis(ApplicationContext applicationContext)
applicationContext
- The ApplicationContext