com.vaadin.hilla.

Class ApplicationContextProvider

java.lang.Object
com.vaadin.hilla.ApplicationContextProvider

All Implemented Interfaces:

org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component public class ApplicationContextProvider extends Object implements org.springframework.context.ApplicationContextAware
  • Constructor Details

    • ApplicationContextProvider

      public ApplicationContextProvider()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException

      Specified by:

      setApplicationContext in interface org.springframework.context.ApplicationContextAware

      Throws:

      org.springframework.beans.BeansException

    • getApplicationContext

      public static org.springframework.context.ApplicationContext getApplicationContext()
    • runOnContext

      public static void runOnContext(Consumer<org.springframework.context.ApplicationContext> action)

      Allows scheduling actions that should be run when the application context is available, or to run them immediately if the context is already available and still active.

      Parameters:

      action - the action to be scheduled or run immediately