Class OciFunction
java.lang.Object
io.micronaut.oraclecloud.function.OciFunction
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
HttpFunction
Parent class that can be used for Oracle Cloud functions.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.OciFunction(io.micronaut.context.ApplicationContext applicationContext) Construct a function with the given context. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected booleanfinal @NonNull io.micronaut.context.ApplicationContextprotected @NonNull io.micronaut.context.ApplicationContextBuildernewApplicationContextBuilder(com.fnproject.fn.api.RuntimeContext ctx) Construct the application context with the given builder.protected voidsetup(com.fnproject.fn.api.RuntimeContext ctx) Setup method that can be overridden by users to add customizations.final voidsetupContext(com.fnproject.fn.api.RuntimeContext ctx) Sets of the function and creates the application context.
-
Constructor Details
-
OciFunction
public OciFunction()Default constructor. Uses a self managed application context. -
OciFunction
public OciFunction(io.micronaut.context.ApplicationContext applicationContext) Construct a function with the given context.- Parameters:
applicationContext- The application context
-
-
Method Details
-
setupContext
public final void setupContext(com.fnproject.fn.api.RuntimeContext ctx) Sets of the function and creates the application context.- Parameters:
ctx- The application context.
-
setup
protected void setup(com.fnproject.fn.api.RuntimeContext ctx) Setup method that can be overridden by users to add customizations.- Parameters:
ctx- The runtime context
-
getApplicationContext
@NonNull public final @NonNull io.micronaut.context.ApplicationContext getApplicationContext()- Returns:
- The application context.
-
newApplicationContextBuilder
@NonNull protected @NonNull io.micronaut.context.ApplicationContextBuilder newApplicationContextBuilder(com.fnproject.fn.api.RuntimeContext ctx) Construct the application context with the given builder.- Parameters:
ctx- The context- Returns:
- The builder
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-