Package com.vaadin.flow.spring
Class SpringVaadinSession
- java.lang.Object
-
- com.vaadin.flow.server.VaadinSession
-
- com.vaadin.flow.spring.SpringVaadinSession
-
- All Implemented Interfaces:
Serializable,EventListener,javax.servlet.http.HttpSessionBindingListener
public class SpringVaadinSession extends VaadinSession
Vaadin session implementation for Spring.- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.flow.server.VaadinSession
browser, UI_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description SpringVaadinSession(VaadinService service)Creates a new VaadinSession tied to a VaadinService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDestroyListener(SessionDestroyListener listener)Adds a listener that gets notified when the Vaadin service session is destroyed.voidfireSessionDestroy()Handles destruction of the session.-
Methods inherited from class com.vaadin.flow.server.VaadinSession
access, accessSynchronously, addRequestHandler, addUI, checkHasLock, checkHasLock, close, createStreamResourceRegistry, getAllSessions, getAttribute, getAttribute, getBrowser, getConfiguration, getCumulativeRequestDuration, getCurrent, getErrorHandler, getLastLocked, getLastRequestDuration, getLastRequestTimestamp, getLastUnlocked, getLocale, getLockInstance, getNextUIid, getPendingAccessQueue, getPushId, getRequestHandlers, getResourceRegistry, getService, getSession, getState, getUIById, getUIs, hasLock, hasLock, lock, refreshTransients, removeRequestHandler, removeUI, setAttribute, setAttribute, setBrowser, setConfiguration, setCurrent, setErrorHandler, setLastRequestDuration, setLastRequestTimestamp, setLocale, setState, unlock, valueBound, valueUnbound
-
-
-
-
Constructor Detail
-
SpringVaadinSession
public SpringVaadinSession(VaadinService service)
Creates a new VaadinSession tied to a VaadinService.- Parameters:
service- the Vaadin service for the new session
-
-
Method Detail
-
fireSessionDestroy
public void fireSessionDestroy()
Handles destruction of the session.
-
addDestroyListener
public void addDestroyListener(SessionDestroyListener listener)
Adds a listener that gets notified when the Vaadin service session is destroyed.No need to remove the listener since all listeners are removed automatically once session is destroyed
The session being destroyed is locked and its UIs have been removed when the listeners are called.
- Parameters:
listener- the vaadin service session destroy listener- See Also:
VaadinService.addSessionInitListener(SessionInitListener)
-
-