Class 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 the IGlobalWebScope interface for web applications.
    Note: for synchronization issues, this class does not store the attributes in the passed ServletContext but in a separate map.
    Author:
    Philip Helger
    • Field Summary

      • Fields inherited from class com.helger.scope.AbstractScope

        m_aRWLock
    • Constructor Summary

      Constructors 
      Constructor Description
      GlobalWebScope​(jakarta.servlet.ServletContext aServletContext)
      Create a new GlobalWebScope.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(Object o)  
      LocalDateTime getCreationDateTime()  
      jakarta.servlet.ServletContext getServletContext()  
      int hashCode()  
      protected void postDestroy()  
      String toString()  
      • Methods inherited from class com.helger.scope.GlobalScope

        initScope, preDestroy
      • Methods inherited from class com.helger.scope.AbstractScope

        attrs, destroyScope, getID, isDestroyed, isInDestruction, isInPreDestruction, isValid, runAtomic, runAtomic
      • Methods inherited from interface com.helger.datetime.domain.IHasCreationDateTime

        getCreationDate, getCreationTime, hasCreationDateTime, isCreatedAt
      • Methods inherited from interface com.helger.scope.IScope

        attrs, destroyScope, getAllScopeRenewalAwareAttributes, getID, initScope, isDestroyed, isInDestruction, isValid, runAtomic, runAtomic
    • Constructor Detail

      • GlobalWebScope

        public GlobalWebScope​(@Nonnull
                              jakarta.servlet.ServletContext aServletContext)
        Create a new GlobalWebScope. No objects are copied from the passed ServletContext so this must be one of the very first action
        Parameters:
        aServletContext - The servlet context to use. May not be null.
    • Method Detail

      • getCreationDateTime

        @Nonnull
        public final LocalDateTime getCreationDateTime()
        Specified by:
        getCreationDateTime in interface com.helger.datetime.domain.IHasCreationDateTime
        Specified by:
        getCreationDateTime in interface IWebScope
        Returns:
        The date and time when this web scope was created. Never null.
      • postDestroy

        protected void postDestroy()
        Overrides:
        postDestroy in class com.helger.scope.GlobalScope
      • getServletContext

        @Nonnull
        public final jakarta.servlet.ServletContext getServletContext()
        Specified by:
        getServletContext in interface IGlobalWebScope
        Returns:
        The underlying servlet context. Never null.
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.helger.scope.AbstractScope
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.helger.scope.AbstractScope
      • toString

        public String toString()
        Overrides:
        toString in class com.helger.scope.AbstractScope