Package 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.context.ApplicationContext
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.void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext)
-
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 interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext() -
runOnContext
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
-