public interface Session
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the value previously stored in the session.
|
List<String> |
getAttributeNames()
Returns a list of the names of all attributes stored in the session.
|
List<String> |
getAttributeNames(String name)
Returns a list of the names of all attributes stored in the session whose name has the provided prefix.
|
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses.
|
void |
invalidate()
Invalidates this session then unbinds any objects bound to it.
|
boolean |
isInvalidated()
Checks to see if the session has been invalidated.
|
void |
setAttribute(String name,
Object value)
Sets the value of an attribute.
|
void |
setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.
|
Object getAttribute(String name)
name
- name of the attributeList<String> getAttributeNames()
List
of the attribute namesList<String> getAttributeNames(String name)
name
- attribute nameint getMaxInactiveInterval()
void invalidate()
boolean isInvalidated()
void setAttribute(String name, Object value)
name
- name of the attributevalue
- value of the attributevoid setMaxInactiveInterval(int interval)
interval
- time interval in secondsCopyright © 2021 BellaDati Inc.. All rights reserved.