Package io.micronaut.azure.function
Class AzureFunction
java.lang.Object
io.micronaut.azure.function.AzureFunction
- All Implemented Interfaces:
io.micronaut.context.ApplicationContextProvider
,Closeable
,AutoCloseable
- Direct Known Subclasses:
AzureHttpFunction
public abstract class AzureFunction
extends Object
implements io.micronaut.context.ApplicationContextProvider, Closeable
A base Azure function class that sets up the Azure environment and preferred configuration.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.micronaut.context.ApplicationContext
protected static final org.slf4j.Logger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor.protected
AzureFunction
(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static @NonNull io.micronaut.context.ApplicationContextBuilder
Provides a builder for the ApplicationContext used for the application.io.micronaut.context.ApplicationContext
protected void
Registers an applicationContextShutdownHook.void
startApplicationContext
(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
applicationContext
protected io.micronaut.context.ApplicationContext applicationContext
-
-
Constructor Details
-
AzureFunction
protected AzureFunction()Default constructor. -
AzureFunction
protected AzureFunction(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder) - Parameters:
applicationContextBuilder
- ApplicationContext Builder;
-
-
Method Details
-
defaultApplicationContextBuilder
@NonNull public static @NonNull io.micronaut.context.ApplicationContextBuilder defaultApplicationContextBuilder()Provides a builder for the ApplicationContext used for the application. This can be overridden to enable customization of the ApplicationContext if needed.- Returns:
- the builder
-
getApplicationContext
public io.micronaut.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContext
in interfaceio.micronaut.context.ApplicationContextProvider
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
startApplicationContext
public void startApplicationContext(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder) -
registerApplicationContextShutDownHook
protected void registerApplicationContextShutDownHook()Registers an applicationContextShutdownHook.
-