Package com.helger.web.scope.impl
Class GlobalWebScope
- java.lang.Object
-
- com.helger.scope.AbstractScope
-
- com.helger.scope.GlobalScope
-
- com.helger.web.scope.impl.GlobalWebScope
-
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.datetime.domain.IHasCreationDateTime,com.helger.scope.IGlobalScope,com.helger.scope.IScope,IGlobalWebScope,IWebScope
@ThreadSafe public class GlobalWebScope extends com.helger.scope.GlobalScope implements IGlobalWebScope
Implementation of theIGlobalWebScopeinterface for web applications.
Note: for synchronization issues, this class does not store the attributes in the passedServletContextbut in a separate map.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description GlobalWebScope(jakarta.servlet.ServletContext aServletContext)Create a newGlobalWebScope.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)LocalDateTimegetCreationDateTime()jakarta.servlet.ServletContextgetServletContext()inthashCode()protected voidpostDestroy()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
-
GlobalWebScope
public GlobalWebScope(@Nonnull jakarta.servlet.ServletContext aServletContext)
Create a newGlobalWebScope. No objects are copied from the passedServletContextso this must be one of the very first action- Parameters:
aServletContext- The servlet context to use. May not benull.
-
-
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.
-
postDestroy
protected void postDestroy()
- Overrides:
postDestroyin classcom.helger.scope.GlobalScope
-
getServletContext
@Nonnull public final jakarta.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfaceIGlobalWebScope- Returns:
- The underlying servlet context. 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
-
-