Package org.dellroad.stuff.vaadin7
Class VaadinSessionInfo
- java.lang.Object
-
- org.dellroad.stuff.vaadin7.VaadinSessionInfo
-
public class VaadinSessionInfo extends Object
Represents oneVaadinSessionin aVaadinSessionContainer.
-
-
Field Summary
Fields Modifier and Type Field Description protected VaadinSessionsessionTheVaadinSessionassociated with this instance.
-
Constructor Summary
Constructors Constructor Description VaadinSessionInfo()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VaadinSessiongetVaadinSession()Get theVaadinSessionassociated with this instance.booleanisCurrentSession()Determine if theVaadinSessionassociated with this instance is also associated with the current thread.protected voidmakeUpdatesVisible()Make the updates previously gathered byupdateInformation()visible in this instance'sVaadinSessionContainer.protected voidupdateInformation()Update this instance with information from its correspondingVaadinSession, which will be associated with the current thread and locked.
-
-
-
Field Detail
-
session
protected final VaadinSession session
TheVaadinSessionassociated with this instance.
-
-
Constructor Detail
-
VaadinSessionInfo
public VaadinSessionInfo()
Constructor.- Throws:
IllegalStateException- if there is no currentVaadinSession
-
-
Method Detail
-
getVaadinSession
public VaadinSession getVaadinSession()
Get theVaadinSessionassociated with this instance.- Returns:
- associated session
-
isCurrentSession
public boolean isCurrentSession()
Determine if theVaadinSessionassociated with this instance is also associated with the current thread.- Returns:
- true if the associated session is the also current thread's session
-
updateInformation
protected void updateInformation()
Update this instance with information from its correspondingVaadinSession, which will be associated with the current thread and locked.This method is invoked from
VaadinSessionContainer.doUpdate(); the implementation inVaadinSessionInfodoes nothing.When this method and
makeUpdatesVisible()are overridden, consider declaring them bothsynchronized, as they are invoked with different locks held yet will access the same information.
-
makeUpdatesVisible
protected void makeUpdatesVisible()
Make the updates previously gathered byupdateInformation()visible in this instance'sVaadinSessionContainer. TheVaadinSessionassociated with this instance'sVaadinSessionContainerwill be associated with the current thread and locked.This method is invoked from
VaadinSessionContainer.doUpdate(); the implementation inVaadinSessionInfodoes nothing.When this method and
updateInformation()are used, consider declaring them bothsynchronized, as they are invoked with different locks held yet will access the same information.
-
-