java.lang.Object
cloud.piranha.webapp.impl.DefaultHttpSession
- All Implemented Interfaces:
HttpSession
The default HttpSession.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
ConstructorDescriptionDefaultHttpSession(ServletContext servletContext)
Constructor.DefaultHttpSession(ServletContext servletContext, String id, boolean newFlag)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name)
Returns the attribute value.Returns the attribute names.long
Returns the creation time.getId()
Returns the id.long
Returns the last accessed time.int
Returns the maximum inactive interval.Returns the servlet context.Get the session context.Returns the value.String[]
Returns the attribute names.void
Invalidate the session.boolean
isNew()
Is the session new.void
Set the value.void
removeAttribute(String name)
Remove the attribute.void
removeValue(String name)
Remove the value.void
setAttribute(String name, Object value)
Set the attribute.void
Set the id.void
setMaxInactiveInterval(int maxInactiveInterval)
Set the maximum inactive interval.void
setNew(boolean newFlag)
Set the new flag.void
setSessionManager(HttpSessionManager sessionManager)
Set the HTTP session manager.
-
Constructor Details
-
DefaultHttpSession
Constructor.- Parameters:
servletContext
- the servlet context.
-
DefaultHttpSession
Constructor.- Parameters:
servletContext
- the servlet context.id
- the id.newFlag
- the new flag.
-
-
Method Details
-
getAttribute
Returns the attribute value.- Specified by:
getAttribute
in interfaceHttpSession
- Parameters:
name
- the attribute name.- Returns:
- the attribute value
- See Also:
HttpSession.getAttribute(java.lang.String)
-
getAttributeNames
Returns the attribute names.- Specified by:
getAttributeNames
in interfaceHttpSession
- Returns:
- the attribute names
- See Also:
HttpSession.getAttributeNames()
-
getCreationTime
public long getCreationTime()Returns the creation time.- Specified by:
getCreationTime
in interfaceHttpSession
- Returns:
- the creation time
- See Also:
HttpSession.getCreationTime()
-
getId
Returns the id.- Specified by:
getId
in interfaceHttpSession
- Returns:
- the id
- See Also:
HttpSession.getId()
-
getLastAccessedTime
public long getLastAccessedTime()Returns the last accessed time.- Specified by:
getLastAccessedTime
in interfaceHttpSession
- Returns:
- the last accessed time
- See Also:
HttpSession.getLastAccessedTime()
-
getMaxInactiveInterval
public int getMaxInactiveInterval()Returns the maximum inactive interval.- Specified by:
getMaxInactiveInterval
in interfaceHttpSession
- Returns:
- the maximum inactive interval
- See Also:
HttpSession.getMaxInactiveInterval()
-
getServletContext
Returns the servlet context.- Specified by:
getServletContext
in interfaceHttpSession
- Returns:
- the servlet context
- See Also:
HttpSession.getServletContext()
-
getSessionContext
Get the session context.- Specified by:
getSessionContext
in interfaceHttpSession
- Returns:
- null
- See Also:
HttpSession.getSessionContext()
-
getValue
Returns the value.- Specified by:
getValue
in interfaceHttpSession
- Parameters:
name
- the attribute name.- Returns:
- the value
- See Also:
HttpSession.getValue(java.lang.String)
-
getValueNames
Returns the attribute names.- Specified by:
getValueNames
in interfaceHttpSession
- Returns:
- the attribute names
- See Also:
HttpSession.getValueNames()
-
invalidate
public void invalidate()Invalidate the session.- Specified by:
invalidate
in interfaceHttpSession
- See Also:
HttpSession.invalidate()
-
isNew
public boolean isNew()Is the session new.- Specified by:
isNew
in interfaceHttpSession
- Returns:
- true if it is, false otherwise.
- See Also:
HttpSession.isNew()
-
putValue
Set the value.- Specified by:
putValue
in interfaceHttpSession
- Parameters:
name
- the attribute name.value
- the attribute value.- See Also:
HttpSession.putValue(java.lang.String, java.lang.Object)
-
removeAttribute
Remove the attribute.- Specified by:
removeAttribute
in interfaceHttpSession
- Parameters:
name
- the attribute name.- See Also:
HttpSession.removeAttribute(java.lang.String)
-
removeValue
Remove the value.- Specified by:
removeValue
in interfaceHttpSession
- Parameters:
name
- the attribute name.- See Also:
HttpSession.removeValue(java.lang.String)
-
setAttribute
Set the attribute.- Specified by:
setAttribute
in interfaceHttpSession
- Parameters:
name
- the attribute name.value
- the attribute value.- See Also:
HttpSession.setAttribute(java.lang.String, java.lang.Object)
-
setId
Set the id.- Parameters:
id
- the id.
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int maxInactiveInterval)Set the maximum inactive interval.- Specified by:
setMaxInactiveInterval
in interfaceHttpSession
- Parameters:
maxInactiveInterval
- the maximum inactive interval.- See Also:
HttpSession.setMaxInactiveInterval(int)
-
setNew
public void setNew(boolean newFlag)Set the new flag.- Parameters:
newFlag
- the new flag.
-
setSessionManager
Set the HTTP session manager.- Parameters:
sessionManager
- the HTTP session manager.
-