| java.lang.Object de.webman.template.jsp.WebManSession
WebManSession | final class WebManSession implements HttpSession,Serializable(Code) | | Standard implementation of the Session interface. This object is
serializable, so that it can be stored in persistent storage or transferred
to a different JVM for distributable session support.
author: $Author: alex $ version: $Revision: 1.3 $ |
Method Summary | |
public void | access() Update the accessed time information for this session. | public void | expire() Perform the internal processing required to invalidate this session,
without triggering an exception if the session has already expired. | public Object | getAttribute(String name) Return the object bound with the specified name in this session, or
null if no object is bound with that name. | public Enumeration | getAttributeNames() Return an Enumeration of String objects
containing the names of the objects bound to this session. | public long | getCreationTime() Return the time when this session was created, in milliseconds since
midnight, January 1, 1970 GMT. | public String | getId() Return the session identifier for this session. | public String | getInfo() Return descriptive information about this Session implementation and
the corresponding version number, in the format
<description>/<version> . | public long | getLastAccessedTime() Return the last time the client sent a request associated with this
session, as the number of milliseconds since midnight, January 1, 1970
GMT. | public int | getMaxInactiveInterval() Return the maximum time interval, in seconds, between client requests
before the servlet container will invalidate the session. | public ServletContext | getServletContext() | public HttpSession | getSession() Return the HttpSession for which this object
is the facade. | public HttpSessionContext | getSessionContext() Return the session context with which this session is associated. | public Object | getValue(String name) Return the object bound with the specified name in this session, or
null if no object is bound with that name. | public String[] | getValueNames() Return the set of names of objects bound to this session. | public void | invalidate() Invalidates this session and unbinds any objects bound to it. | public boolean | isNew() Return true if the client does not yet know about the
session, or if the client chooses not to join the session. | boolean | isValid() Return the isValid flag for this session. | public void | putValue(String name, Object value) Bind an object to this session, using the specified name. | public void | recycle() Release all object references, and initialize instance variables, in
preparation for reuse of this object. | public void | removeAttribute(String name) Remove the object bound with the specified name from this session. | public void | removeValue(String name) Remove the object bound with the specified name from this session. | public void | setAttribute(String name, Object value) Bind an object to this session, using the specified name. | public void | setCreationTime(long time) Set the creation time for this session. | public void | setId(String id) Set the session identifier for this session. | public void | setMaxInactiveInterval(int interval) Set the maximum time interval, in seconds, between client requests
before the servlet container will invalidate the session. | void | setNew(boolean isNew) Set the isNew flag for this session. | void | setValid(boolean isValid) Set the isValid flag for this session. |
WebManSession | WebManSession(ServletContext _context)(Code) | | Construct a new Session associated with the specified Manager.
Parameters: manager - The manager with which this Session is associated |
access | public void access()(Code) | | Update the accessed time information for this session. This method
should be called by the context when a request comes in for a particular
session, even if the application does not reference it.
|
expire | public void expire()(Code) | | Perform the internal processing required to invalidate this session,
without triggering an exception if the session has already expired.
|
getAttribute | public Object getAttribute(String name)(Code) | | Return the object bound with the specified name in this session, or
null if no object is bound with that name.
Parameters: name - Name of the attribute to be returned exception: IllegalStateException - if this method is called on aninvalidated session |
getAttributeNames | public Enumeration getAttributeNames()(Code) | | Return an Enumeration of String objects
containing the names of the objects bound to this session.
exception: IllegalStateException - if this method is called on aninvalidated session |
getCreationTime | public long getCreationTime()(Code) | | Return the time when this session was created, in milliseconds since
midnight, January 1, 1970 GMT.
exception: IllegalStateException - if this method is called on aninvalidated session |
getId | public String getId()(Code) | | Return the session identifier for this session.
|
getInfo | public String getInfo()(Code) | | Return descriptive information about this Session implementation and
the corresponding version number, in the format
<description>/<version> .
|
getLastAccessedTime | public long getLastAccessedTime()(Code) | | Return the last time the client sent a request associated with this
session, as the number of milliseconds since midnight, January 1, 1970
GMT. Actions that your application takes, such as getting or setting
a value associated with the session, do not affect the access time.
|
getMaxInactiveInterval | public int getMaxInactiveInterval()(Code) | | Return the maximum time interval, in seconds, between client requests
before the servlet container will invalidate the session. A negative
time indicates that the session should never time out.
exception: IllegalStateException - if this method is called onan invalidated session |
getSession | public HttpSession getSession()(Code) | | Return the HttpSession for which this object
is the facade.
|
getSessionContext | public HttpSessionContext getSessionContext()(Code) | | Return the session context with which this session is associated.
|
getValue | public Object getValue(String name)(Code) | | Return the object bound with the specified name in this session, or
null if no object is bound with that name.
Parameters: name - Name of the value to be returned exception: IllegalStateException - if this method is called on aninvalidated session |
getValueNames | public String[] getValueNames()(Code) | | Return the set of names of objects bound to this session. If there
are no such objects, a zero-length array is returned.
exception: IllegalStateException - if this method is called on aninvalidated session |
invalidate | public void invalidate()(Code) | | Invalidates this session and unbinds any objects bound to it.
exception: IllegalStateException - if this method is called onan invalidated session |
isNew | public boolean isNew()(Code) | | Return true if the client does not yet know about the
session, or if the client chooses not to join the session. For
example, if the server used only cookie-based sessions, and the client
has disabled the use of cookies, then a session would be new on each
request.
exception: IllegalStateException - if this method is called on aninvalidated session |
isValid | boolean isValid()(Code) | | Return the isValid flag for this session.
|
putValue | public void putValue(String name, Object value)(Code) | | Bind an object to this session, using the specified name. If an object
of the same name is already bound to this session, the object is
replaced.
After this method executes, and if the object implements
HttpSessionBindingListener , the container calls
valueBound() on the object.
Parameters: name - Name to which the object is bound, cannot be null Parameters: value - Object to be bound, cannot be null exception: IllegalStateException - if this method is called on aninvalidated session |
recycle | public void recycle()(Code) | | Release all object references, and initialize instance variables, in
preparation for reuse of this object.
|
removeAttribute | public void removeAttribute(String name)(Code) | | Remove the object bound with the specified name from this session. If
the session does not have an object bound with this name, this method
does nothing.
After this method executes, and if the object implements
HttpSessionBindingListener , the container calls
valueUnbound() on the object.
Parameters: name - Name of the object to remove from this session. exception: IllegalStateException - if this method is called on aninvalidated session |
removeValue | public void removeValue(String name)(Code) | | Remove the object bound with the specified name from this session. If
the session does not have an object bound with this name, this method
does nothing.
After this method executes, and if the object implements
HttpSessionBindingListener , the container calls
valueUnbound() on the object.
Parameters: name - Name of the object to remove from this session. exception: IllegalStateException - if this method is called on aninvalidated session |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Bind an object to this session, using the specified name. If an object
of the same name is already bound to this session, the object is
replaced.
After this method executes, and if the object implements
HttpSessionBindingListener , the container calls
valueBound() on the object.
Parameters: name - Name to which the object is bound, cannot be null Parameters: value - Object to be bound, cannot be null exception: IllegalArgumentException - if an attempt is made to add anon-serializable object in an environment marked distributable. exception: IllegalStateException - if this method is called on aninvalidated session |
setCreationTime | public void setCreationTime(long time)(Code) | | Set the creation time for this session. This method is called by the
Manager when an existing Session instance is reused.
Parameters: time - The new creation time |
setId | public void setId(String id)(Code) | | Set the session identifier for this session.
Parameters: id - The new session identifier |
setMaxInactiveInterval | public void setMaxInactiveInterval(int interval)(Code) | | Set the maximum time interval, in seconds, between client requests
before the servlet container will invalidate the session. A negative
time indicates that the session should never time out.
Parameters: interval - The new maximum interval |
setNew | void setNew(boolean isNew)(Code) | | Set the isNew flag for this session.
Parameters: isNew - The new value for the isNew flag |
setValid | void setValid(boolean isValid)(Code) | | Set the isValid flag for this session.
Parameters: isValid - The new value for the isValid flag |
|
|