Package com.vaadin.flow.spring.scopes
Class VaadinRouteScope
java.lang.Object
com.vaadin.flow.spring.scopes.VaadinRouteScope
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor
,org.springframework.beans.factory.config.Scope
Implementation of Spring's
Scope
that binds the beans
to a component in the navigation chain. Registered by default as the scope "
"vaadin-route"".- Since:
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.spring.scopes.BeanStore
Gets bean store for this scope.protected VaadinSession
Gets current Vaadin session.void
postProcessBeanFactory
(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) void
registerDestructionCallback
(String name, Runnable callback)
-
Field Details
-
VAADIN_ROUTE_SCOPE_NAME
- See Also:
-
-
Constructor Details
-
VaadinRouteScope
public VaadinRouteScope()
-
-
Method Details
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) -
getConversationId
-
get
- Specified by:
get
in interfaceorg.springframework.beans.factory.config.Scope
-
getBeanStore
protected com.vaadin.flow.spring.scopes.BeanStore getBeanStore()Gets bean store for this scope.- Returns:
- bean store for the scope
-
resolveContextualObject
- Specified by:
resolveContextualObject
in interfaceorg.springframework.beans.factory.config.Scope
-
remove
- Specified by:
remove
in interfaceorg.springframework.beans.factory.config.Scope
-
registerDestructionCallback
- Specified by:
registerDestructionCallback
in interfaceorg.springframework.beans.factory.config.Scope
-
getVaadinSession
Gets current Vaadin session.Throws
IllegalStateException
if there is no current Vaadin session scope or it's not opened.- Returns:
- the current Vaadin session
-