Package com.helger.web.scope.impl
Class SessionWebScope
- java.lang.Object
-
- com.helger.scope.AbstractScope
-
- com.helger.scope.SessionScope
-
- com.helger.web.scope.impl.SessionWebScope
-
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.datetime.domain.IHasCreationDateTime,com.helger.scope.IScope,com.helger.scope.ISessionScope,ISessionWebScope,IWebScope
@ThreadSafe public class SessionWebScope extends com.helger.scope.SessionScope implements ISessionWebScope
Default implementation of theISessionWebScopeinterface. It is serializable in general, but just don't do it :)- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description SessionWebScope(jakarta.servlet.http.HttpSession aHttpSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)LocalDateTimegetCreationDateTime()jakarta.servlet.http.HttpSessiongetSession()Get the underlying HTTP session.inthashCode()voidinitScope()com.helger.commons.state.EContinueselfDestruct()StringtoString()-
Methods inherited from class com.helger.scope.AbstractScope
attrs, destroyScope, getID, isDestroyed, isInDestruction, isInPreDestruction, isValid, runAtomic, runAtomic
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
SessionWebScope
public SessionWebScope(@Nonnull jakarta.servlet.http.HttpSession aHttpSession)
-
-
Method Detail
-
getCreationDateTime
@Nonnull public final LocalDateTime getCreationDateTime()
- Specified by:
getCreationDateTimein interfacecom.helger.datetime.domain.IHasCreationDateTime- Specified by:
getCreationDateTimein interfaceIWebScope- Returns:
- The date and time when this web scope was created. Never
null.
-
initScope
public void initScope()
- Specified by:
initScopein interfacecom.helger.scope.IScope- Overrides:
initScopein classcom.helger.scope.SessionScope
-
selfDestruct
@Nonnull public com.helger.commons.state.EContinue selfDestruct()
- Specified by:
selfDestructin interfacecom.helger.scope.ISessionScope- Overrides:
selfDestructin classcom.helger.scope.SessionScope
-
getSession
@Nonnull public jakarta.servlet.http.HttpSession getSession()
Description copied from interface:ISessionWebScopeGet the underlying HTTP session. Important: do not use it to access the attributes within the session. Use only the scope API for this, so that the synchronization is consistent!- Specified by:
getSessionin interfaceISessionWebScope- Returns:
- The underlying HTTP session. Never
null.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.helger.scope.AbstractScope
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.helger.scope.AbstractScope
-
toString
public String toString()
- Overrides:
toStringin classcom.helger.scope.AbstractScope
-
-