- All Known Implementing Classes:
DefaultHttpSession
public interface HttpSession
The HttpSession API.
- Author:
- Manfred Riem ([email protected])
-
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.Deprecated.Deprecated.String[]
Deprecated.void
Invalidate the HTTP session.boolean
isNew()
Is the HTTP session new.void
Deprecated.void
removeAttribute(String name)
Remove the attribute.void
removeValue(String name)
Deprecated.void
setAttribute(String name, Object value)
Set the attribute.void
setMaxInactiveInterval(int interval)
Set the max inactive interval.
-
Method Details
-
getAttribute
Get the attribute.- Parameters:
name
- the name.- Returns:
- the value, or null if not found.
-
getAttributeNames
Enumeration<String> getAttributeNames()Returns the attribute names.- Returns:
- the attribute names
-
getCreationTime
long getCreationTime()Returns the creation time.- Returns:
- the creation time
-
getId
String getId()Returns the id.- Returns:
- the id
-
getLastAccessedTime
long getLastAccessedTime()Returns the last accessed time.- Returns:
- the last accessed time
-
getMaxInactiveInterval
int getMaxInactiveInterval()Returns the max inactive interval.- Returns:
- the max inactive interval
-
getServletContext
ServletContext getServletContext()Returns the Servlet context.- Returns:
- the Servlet context
-
getSessionContext
Deprecated.Returns the HTTP session context.- Returns:
- the HTTP session context
-
getValue
Deprecated.Returns the value.- Parameters:
name
- the name.- Returns:
- the value
-
getValueNames
Deprecated.Returns the value names.- Returns:
- the value names
-
invalidate
void invalidate()Invalidate the HTTP session. -
isNew
boolean isNew()Is the HTTP session new.- Returns:
- true if it is, false otherwise.
-
putValue
Deprecated.Put the value.- Parameters:
name
- the name.value
- the value.
-
removeAttribute
Remove the attribute.- Parameters:
name
- the name.
-
removeValue
Deprecated.Remove the value.- Parameters:
name
- the name.
-
setAttribute
Set the attribute.- Parameters:
name
- the name.value
- the value.
-
setMaxInactiveInterval
void setMaxInactiveInterval(int interval)Set the max inactive interval.- Parameters:
interval
- the max inactive interval.
-