| Modifier and Type | Field and Description |
|---|---|
| private final HttpSession | session
Wrapped session object. |
| Access | Constructor and Description |
|---|---|
| public | StandardSessionFacade(HttpSession
The session instance to wrap session)Construct a new session facade. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getAttribute(String
a string specifying the name of the object name)Implements jakarta. Returns the object bound with the specified name in this session, or |
| public Enumeration | getAttributeNames()
Implements jakarta. Returns an |
| public long | getCreationTime()
Implements jakarta. Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
| public String | getId()
Implements jakarta. Returns a string containing the unique identifier assigned to this session. |
| public long | getLastAccessedTime()
Implements jakarta. Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT, and marked by the time the container received the request. |
| public int | getMaxInactiveInterval()
Implements jakarta. Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses. |
| public ServletContext | getServletContext()
Implements jakarta. Returns the ServletContext to which this session belongs. |
| public void | invalidate()
Implements jakarta. Invalidates this session then unbinds any objects bound to it. |
| public boolean | isNew()
Implements jakarta. Returns |
| public void | removeAttribute(String
the name of the object to remove from this session name)Implements jakarta. Removes the object bound with the specified name from this session. |
| public void | setAttribute(String
the name to which the object is bound; cannot be null name, Object the object to be bound value)Implements jakarta. Binds an object to this session, using the name specified. |
| public void | setMaxInactiveInterval(int
An integer specifying the number of seconds interval)Implements jakarta. Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. |
| session | back to summary |
|---|---|
| private final HttpSession session Wrapped session object. | |
| StandardSessionFacade | back to summary |
|---|---|
| public StandardSessionFacade(HttpSession session) Construct a new session facade.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) Implements jakarta. Doc from jakarta. Returns the object bound with the specified name in this session, or | |
| getAttributeNames | back to summary |
|---|---|
| public Enumeration Implements jakarta. Doc from jakarta. Returns an
| |
| getCreationTime | back to summary |
|---|---|
| public long getCreationTime() Implements jakarta. Doc from jakarta. Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
| |
| getId | back to summary |
|---|---|
| public String getId() Implements jakarta. Doc from jakarta. Returns a string containing the unique identifier assigned to this session. The identifier is assigned by the servlet container and is implementation dependent. | |
| getLastAccessedTime | back to summary |
|---|---|
| public long getLastAccessedTime() Implements jakarta. Doc from jakarta. Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT, and marked by the time the container received the request. Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
| |
| getMaxInactiveInterval | back to summary |
|---|---|
| public int getMaxInactiveInterval() Implements jakarta. Doc from jakarta. Returns the maximum time interval, in seconds, that the servlet container will keep this session open between
client accesses. After this interval, the servlet container will invalidate the session. The maximum time
interval can be set with the
| |
| getServletContext | back to summary |
|---|---|
| public ServletContext getServletContext() Implements jakarta. Doc from jakarta. Returns the ServletContext to which this session belongs.
| |
| invalidate | back to summary |
|---|---|
| public void invalidate() Implements jakarta. Doc from jakarta. Invalidates this session then unbinds any objects bound to it.
| |
| isNew | back to summary |
|---|---|
| public boolean isNew() Implements jakarta. Doc from jakarta. Returns
| |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(String name) Implements jakarta. Doc from jakarta. Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
After this method executes, and if the object implements | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, Object value) Implements jakarta. Doc from jakarta. Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.
After this method executes, and if the new object implements
If an object was already bound to this session of this name that implements
If the value passed in is null, this has the same effect as calling | |
| setMaxInactiveInterval | back to summary |
|---|---|
| public void setMaxInactiveInterval(int interval) Implements jakarta. Doc from jakarta. Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. A zero or negative time indicates that the session should never timeout.
| |