Class BrowserTabSessionImpl

java.lang.Object
name.matthewgreet.strutscommons.action.BrowserTabSessionImpl
All Implemented Interfaces:
javax.servlet.http.HttpSession, BrowserTabSession

public class BrowserTabSessionImpl extends Object implements BrowserTabSession
Implementation of BrowserTabSession.
  • Constructor Details

    • BrowserTabSessionImpl

      public BrowserTabSessionImpl(javax.servlet.http.HttpSession httpSession, String tabId)
  • Method Details

    • getAttributeInternal

      protected Object getAttributeInternal(String name)
    • getGuaranteedPrivateMap

      protected Map<String,Object> getGuaranteedPrivateMap()
    • getPrivateAttributeNamesInternal

      protected Set<String> getPrivateAttributeNamesInternal()
    • getSharedAttributeNamesInternal

      protected Set<String> getSharedAttributeNamesInternal()
    • purgePrivateAttributes

      protected void purgePrivateAttributes(String name)
    • removeAttributeInternal

      protected void removeAttributeInternal(String name)
    • setAttributeInternal

      protected void setAttributeInternal(String name, Object value)
    • getAllTabIds

      public Set<String> getAllTabIds()
      Description copied from interface: BrowserTabSession
      Returns ids of all browser tabs known to exist for the user.
      Specified by:
      getAllTabIds in interface BrowserTabSession
    • getAttribute

      public Object getAttribute(String name)
      Description copied from interface: BrowserTabSession
      Returns object bound to name, whether as private or shared attribute, or null if none.
      Specified by:
      getAttribute in interface BrowserTabSession
      Specified by:
      getAttribute in interface javax.servlet.http.HttpSession
    • getAttributeMap

      public Map<String,Object> getAttributeMap()
      Description copied from interface: BrowserTabSession
      Returns shallow copy of all attributes, whether private or shared. Changing the map won't affect the session.
      Specified by:
      getAttributeMap in interface BrowserTabSession
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Description copied from interface: BrowserTabSession
      Returns an enumeration of all attribute names, whether private or shared.
      Specified by:
      getAttributeNames in interface BrowserTabSession
      Specified by:
      getAttributeNames in interface javax.servlet.http.HttpSession
    • getCreationTime

      public long getCreationTime()
      Specified by:
      getCreationTime in interface javax.servlet.http.HttpSession
    • getHttpSession

      public javax.servlet.http.HttpSession getHttpSession()
      Description copied from interface: BrowserTabSession
      Returns underlying request session.
      Specified by:
      getHttpSession in interface BrowserTabSession
    • getId

      public String getId()
      Specified by:
      getId in interface javax.servlet.http.HttpSession
    • getLastAccessedTime

      public long getLastAccessedTime()
      Specified by:
      getLastAccessedTime in interface javax.servlet.http.HttpSession
    • getMaxInactiveInterval

      public int getMaxInactiveInterval()
      Specified by:
      getMaxInactiveInterval in interface javax.servlet.http.HttpSession
    • getPrivateAttributeMap

      public Map<String,Object> getPrivateAttributeMap()
      Description copied from interface: BrowserTabSession
      Returns shallow copy of private, tab-specific attributes. Changing the map won't affect the session.
      Specified by:
      getPrivateAttributeMap in interface BrowserTabSession
    • getPrivateAttributeNames

      public Set<String> getPrivateAttributeNames()
      Description copied from interface: BrowserTabSession
      Returns set of names of private, tab-specific attributes.
      Specified by:
      getPrivateAttributeNames in interface BrowserTabSession
    • getServletContext

      public javax.servlet.ServletContext getServletContext()
      Specified by:
      getServletContext in interface javax.servlet.http.HttpSession
    • getSessionContext

      public javax.servlet.http.HttpSessionContext getSessionContext()
      Specified by:
      getSessionContext in interface javax.servlet.http.HttpSession
    • getSharedAttributeMap

      public Map<String,Object> getSharedAttributeMap()
      Description copied from interface: BrowserTabSession
      Returns shallow copy of shared attributes. Changing the map won't affect the session.
      Specified by:
      getSharedAttributeMap in interface BrowserTabSession
    • getSharedAttributeNames

      public Set<String> getSharedAttributeNames()
      Description copied from interface: BrowserTabSession
      Returns set of names of shared attributes.
      Specified by:
      getSharedAttributeNames in interface BrowserTabSession
    • getTabId

      public String getTabId()
      Description copied from interface: BrowserTabSession
      Returns id of browser tab.
      Specified by:
      getTabId in interface BrowserTabSession
    • getValue

      public Object getValue(String name)
      Specified by:
      getValue in interface javax.servlet.http.HttpSession
    • getValueNames

      public String[] getValueNames()
      Specified by:
      getValueNames in interface javax.servlet.http.HttpSession
    • invalidate

      public void invalidate()
      Specified by:
      invalidate in interface javax.servlet.http.HttpSession
    • isNew

      public boolean isNew()
      Specified by:
      isNew in interface javax.servlet.http.HttpSession
    • putValue

      public void putValue(String name, Object value)
      Specified by:
      putValue in interface javax.servlet.http.HttpSession
    • removeAttribute

      public void removeAttribute(String name)
      Specified by:
      removeAttribute in interface javax.servlet.http.HttpSession
    • removeValue

      public void removeValue(String name)
      Specified by:
      removeValue in interface javax.servlet.http.HttpSession
    • setAttribute

      public void setAttribute(String name, Object value)
      Description copied from interface: BrowserTabSession
      Binds an object to a name as a private, tab-specific attribute, replacing any existing value. If the attribute already exists and is shared, the attribute remains shared.
      Specified by:
      setAttribute in interface BrowserTabSession
      Specified by:
      setAttribute in interface javax.servlet.http.HttpSession
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(int interval)
      Specified by:
      setMaxInactiveInterval in interface javax.servlet.http.HttpSession
    • setSharedAttribute

      public void setSharedAttribute(String name, Object value)
      Description copied from interface: BrowserTabSession
      Like BrowserTabSession.setAttribute(java.lang.String, java.lang.Object), binds an object to a name but as a shared attribute. If any private attributes have the same name, they're removed.
      Specified by:
      setSharedAttribute in interface BrowserTabSession