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 Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • applicationContext

      protected static 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 interface io.micronaut.context.ApplicationContextProvider
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • startApplicationContext

      public void startApplicationContext(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
      Initializes the application context. The context manages bean definitions and resolves dependencies.
      Parameters:
      applicationContextBuilder - the builder used to construct the application context
    • registerApplicationContextShutDownHook

      protected void registerApplicationContextShutDownHook()
      Registers an applicationContextShutdownHook.