javax.servlet.http.HttpSession
public class DefaultHttpSession
extends java.lang.Object
implements javax.servlet.http.HttpSession
Constructor | Description |
---|---|
DefaultHttpSession(javax.servlet.ServletContext servletContext) |
Constructor.
|
DefaultHttpSession(javax.servlet.ServletContext servletContext,
java.lang.String id,
boolean newFlag) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
getAttribute(java.lang.String name) |
Get the attribute value.
|
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
Get the attribute names.
|
long |
getCreationTime() |
Get the creation time.
|
java.lang.String |
getId() |
Get the id.
|
long |
getLastAccessedTime() |
Get the last accessed time.
|
int |
getMaxInactiveInterval() |
Get the maximum inactive interval.
|
javax.servlet.ServletContext |
getServletContext() |
Get the servlet context.
|
javax.servlet.http.HttpSessionContext |
getSessionContext() |
Get the session context.
|
java.lang.Object |
getValue(java.lang.String name) |
Get the value.
|
java.lang.String[] |
getValueNames() |
Get the attribute names.
|
void |
invalidate() |
Invalidate the session.
|
boolean |
isNew() |
Is the session new.
|
void |
putValue(java.lang.String name,
java.lang.Object value) |
Set the value.
|
void |
removeAttribute(java.lang.String name) |
Remove the attribute.
|
void |
removeValue(java.lang.String name) |
Remove the value.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
Set the attribute.
|
void |
setId(java.lang.String id) |
Set the id.
|
void |
setMaxInactiveInterval(int maxInactiveInterval) |
Set the maximum inactive interval.
|
void |
setNew(boolean newFlag) |
Set the new flag.
|
void |
setSessionManager(cloud.piranha.api.HttpSessionManager sessionManager) |
Set the HTTP session manager.
|
public DefaultHttpSession(javax.servlet.ServletContext servletContext)
servletContext
- the servlet context.public DefaultHttpSession(javax.servlet.ServletContext servletContext, java.lang.String id, boolean newFlag)
servletContext
- the servlet context.id
- the id.newFlag
- the new flag.public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.http.HttpSession
name
- the attribute name.HttpSession.getAttribute(java.lang.String)
public java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames
in interface javax.servlet.http.HttpSession
HttpSession.getAttributeNames()
public long getCreationTime()
getCreationTime
in interface javax.servlet.http.HttpSession
HttpSession.getCreationTime()
public java.lang.String getId()
getId
in interface javax.servlet.http.HttpSession
HttpSession.getId()
public long getLastAccessedTime()
getLastAccessedTime
in interface javax.servlet.http.HttpSession
HttpSession.getLastAccessedTime()
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface javax.servlet.http.HttpSession
HttpSession.getMaxInactiveInterval()
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.http.HttpSession
HttpSession.getServletContext()
public javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext
in interface javax.servlet.http.HttpSession
HttpSession.getSessionContext()
public java.lang.Object getValue(java.lang.String name)
getValue
in interface javax.servlet.http.HttpSession
name
- the attribute name.HttpSession.getValue(java.lang.String)
public java.lang.String[] getValueNames()
getValueNames
in interface javax.servlet.http.HttpSession
HttpSession.getValueNames()
public void invalidate()
invalidate
in interface javax.servlet.http.HttpSession
HttpSession.invalidate()
public boolean isNew()
isNew
in interface javax.servlet.http.HttpSession
HttpSession.isNew()
public void putValue(java.lang.String name, java.lang.Object value)
putValue
in interface javax.servlet.http.HttpSession
name
- the attribute name.value
- the attribute value.HttpSession.putValue(java.lang.String, java.lang.Object)
public void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.http.HttpSession
name
- the attribute name.HttpSession.removeAttribute(java.lang.String)
public void removeValue(java.lang.String name)
removeValue
in interface javax.servlet.http.HttpSession
name
- the attribute name.HttpSession.removeValue(java.lang.String)
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.http.HttpSession
name
- the attribute name.value
- the attribute value.HttpSession.setAttribute(java.lang.String, java.lang.Object)
public void setId(java.lang.String id)
id
- the id.public void setMaxInactiveInterval(int maxInactiveInterval)
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
maxInactiveInterval
- the maximum inactive interval.HttpSession.setMaxInactiveInterval(int)
public void setNew(boolean newFlag)
newFlag
- the new flag.public void setSessionManager(cloud.piranha.api.HttpSessionManager sessionManager)
sessionManager
- the HTTP session manager.Copyright © 2020 Piranha Cloud. All rights reserved.