java.lang.Object
cloud.piranha.core.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) Get the attribute.Returns the attribute names.long
Returns the creation time.getId()
Returns the id.long
Returns the last accessed time.int
Returns the max inactive interval.Returns the Servlet context.Returns the HTTP session context.Returns the value.String[]
Returns the value names.void
Invalidate the HTTP session.boolean
isNew()
Is the HTTP session new.void
Put 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
setLastAccessedTime
(long lastAccessedTime) Set the last accessed time.void
setMaxInactiveInterval
(int maxInactiveInterval) Set the max 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
Description copied from interface:HttpSession
Get the attribute.- Specified by:
getAttribute
in interfaceHttpSession
- Parameters:
name
- the name.- Returns:
- the value, or null if not found.
-
getAttributeNames
Description copied from interface:HttpSession
Returns the attribute names.- Specified by:
getAttributeNames
in interfaceHttpSession
- Returns:
- the attribute names
-
getCreationTime
public long getCreationTime()Description copied from interface:HttpSession
Returns the creation time.- Specified by:
getCreationTime
in interfaceHttpSession
- Returns:
- the creation time
-
getId
Description copied from interface:HttpSession
Returns the id.- Specified by:
getId
in interfaceHttpSession
- Returns:
- the id
-
getLastAccessedTime
public long getLastAccessedTime()Description copied from interface:HttpSession
Returns the last accessed time.- Specified by:
getLastAccessedTime
in interfaceHttpSession
- Returns:
- the last accessed time
-
getMaxInactiveInterval
public int getMaxInactiveInterval()Description copied from interface:HttpSession
Returns the max inactive interval.- Specified by:
getMaxInactiveInterval
in interfaceHttpSession
- Returns:
- the max inactive interval
-
getServletContext
Description copied from interface:HttpSession
Returns the Servlet context.- Specified by:
getServletContext
in interfaceHttpSession
- Returns:
- the Servlet context
-
getSessionContext
Description copied from interface:HttpSession
Returns the HTTP session context.- Specified by:
getSessionContext
in interfaceHttpSession
- Returns:
- the HTTP session context
-
getValue
Description copied from interface:HttpSession
Returns the value.- Specified by:
getValue
in interfaceHttpSession
- Parameters:
name
- the name.- Returns:
- the value
-
getValueNames
Description copied from interface:HttpSession
Returns the value names.- Specified by:
getValueNames
in interfaceHttpSession
- Returns:
- the value names
-
invalidate
public void invalidate()Description copied from interface:HttpSession
Invalidate the HTTP session.- Specified by:
invalidate
in interfaceHttpSession
-
isNew
public boolean isNew()Description copied from interface:HttpSession
Is the HTTP session new.- Specified by:
isNew
in interfaceHttpSession
- Returns:
- true if it is, false otherwise.
-
putValue
Description copied from interface:HttpSession
Put the value.- Specified by:
putValue
in interfaceHttpSession
- Parameters:
name
- the name.value
- the value.
-
removeAttribute
Description copied from interface:HttpSession
Remove the attribute.- Specified by:
removeAttribute
in interfaceHttpSession
- Parameters:
name
- the name.
-
removeValue
Description copied from interface:HttpSession
Remove the value.- Specified by:
removeValue
in interfaceHttpSession
- Parameters:
name
- the name.
-
setAttribute
Description copied from interface:HttpSession
Set the attribute.- Specified by:
setAttribute
in interfaceHttpSession
- Parameters:
name
- the name.value
- the value.
-
setId
Set the id.- Parameters:
id
- the id.
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int maxInactiveInterval) Description copied from interface:HttpSession
Set the max inactive interval.- Specified by:
setMaxInactiveInterval
in interfaceHttpSession
- Parameters:
maxInactiveInterval
- the max inactive interval.
-
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.
-
setLastAccessedTime
public void setLastAccessedTime(long lastAccessedTime) Set the last accessed time.- Parameters:
lastAccessedTime
- the last accessed time.
-