Class BrowserTabSessionImpl
java.lang.Object
name.matthewgreet.strutscommons.action.BrowserTabSessionImpl
- All Implemented Interfaces:
javax.servlet.http.HttpSession
,BrowserTabSession
Implementation of
BrowserTabSession
.-
Constructor Summary
ConstructorsConstructorDescriptionBrowserTabSessionImpl
(javax.servlet.http.HttpSession httpSession, String tabId) -
Method Summary
Modifier and TypeMethodDescriptionReturns ids of all browser tabs known to exist for the user.getAttribute
(String name) Returns object bound to name, whether as private or shared attribute, or null if none.protected Object
getAttributeInternal
(String name) Returns shallow copy of all attributes, whether private or shared.Returns an enumeration of all attribute names, whether private or shared.long
javax.servlet.http.HttpSession
Returns underlying request session.getId()
long
int
Returns shallow copy of private, tab-specific attributes.Returns set of names of private, tab-specific attributes.javax.servlet.ServletContext
javax.servlet.http.HttpSessionContext
Returns shallow copy of shared attributes.Returns set of names of shared attributes.getTabId()
Returns id of browser tab.String[]
void
boolean
isNew()
protected void
purgePrivateAttributes
(String name) void
void
removeAttribute
(String name) protected void
void
removeValue
(String name) void
setAttribute
(String name, Object value) Binds an object to a name as a private, tab-specific attribute, replacing any existing value.protected void
setAttributeInternal
(String name, Object value) void
setMaxInactiveInterval
(int interval) void
setSharedAttribute
(String name, Object value) LikeBrowserTabSession.setAttribute(java.lang.String, java.lang.Object)
, binds an object to a name but as a shared attribute.
-
Constructor Details
-
BrowserTabSessionImpl
-
-
Method Details
-
getAttributeInternal
-
getGuaranteedPrivateMap
-
getPrivateAttributeNamesInternal
-
purgePrivateAttributes
-
removeAttributeInternal
-
setAttributeInternal
-
getAllTabIds
Description copied from interface:BrowserTabSession
Returns ids of all browser tabs known to exist for the user.- Specified by:
getAllTabIds
in interfaceBrowserTabSession
-
getAttribute
Description copied from interface:BrowserTabSession
Returns object bound to name, whether as private or shared attribute, or null if none.- Specified by:
getAttribute
in interfaceBrowserTabSession
- Specified by:
getAttribute
in interfacejavax.servlet.http.HttpSession
-
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 interfaceBrowserTabSession
-
getAttributeNames
Description copied from interface:BrowserTabSession
Returns an enumeration of all attribute names, whether private or shared.- Specified by:
getAttributeNames
in interfaceBrowserTabSession
- Specified by:
getAttributeNames
in interfacejavax.servlet.http.HttpSession
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTime
in interfacejavax.servlet.http.HttpSession
-
getHttpSession
public javax.servlet.http.HttpSession getHttpSession()Description copied from interface:BrowserTabSession
Returns underlying request session.- Specified by:
getHttpSession
in interfaceBrowserTabSession
-
getId
- Specified by:
getId
in interfacejavax.servlet.http.HttpSession
-
getLastAccessedTime
public long getLastAccessedTime()- Specified by:
getLastAccessedTime
in interfacejavax.servlet.http.HttpSession
-
getMaxInactiveInterval
public int getMaxInactiveInterval()- Specified by:
getMaxInactiveInterval
in interfacejavax.servlet.http.HttpSession
-
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 interfaceBrowserTabSession
-
getPrivateAttributeNames
Description copied from interface:BrowserTabSession
Returns set of names of private, tab-specific attributes.- Specified by:
getPrivateAttributeNames
in interfaceBrowserTabSession
-
getServletContext
public javax.servlet.ServletContext getServletContext()- Specified by:
getServletContext
in interfacejavax.servlet.http.HttpSession
-
getSessionContext
public javax.servlet.http.HttpSessionContext getSessionContext()- Specified by:
getSessionContext
in interfacejavax.servlet.http.HttpSession
-
getTabId
Description copied from interface:BrowserTabSession
Returns id of browser tab.- Specified by:
getTabId
in interfaceBrowserTabSession
-
getValue
- Specified by:
getValue
in interfacejavax.servlet.http.HttpSession
-
getValueNames
- Specified by:
getValueNames
in interfacejavax.servlet.http.HttpSession
-
invalidate
public void invalidate()- Specified by:
invalidate
in interfacejavax.servlet.http.HttpSession
-
isNew
public boolean isNew()- Specified by:
isNew
in interfacejavax.servlet.http.HttpSession
-
putValue
- Specified by:
putValue
in interfacejavax.servlet.http.HttpSession
-
removeAttribute
- Specified by:
removeAttribute
in interfacejavax.servlet.http.HttpSession
-
removeValue
- Specified by:
removeValue
in interfacejavax.servlet.http.HttpSession
-
setAttribute
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 interfaceBrowserTabSession
- Specified by:
setAttribute
in interfacejavax.servlet.http.HttpSession
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval) - Specified by:
setMaxInactiveInterval
in interfacejavax.servlet.http.HttpSession
-