HttpSession that is used to maintain state information
between requests for a particular user of a web application.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | SESSION_ACTIVATED_EVENT
The SessionEvent event type when a session is activated. |
| public static final String | SESSION_CREATED_EVENT
The SessionEvent event type when a session is created. |
| public static final String | SESSION_DESTROYED_EVENT
The SessionEvent event type when a session is destroyed. |
| public static final String | SESSION_PASSIVATED_EVENT
The SessionEvent event type when a session is passivated. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addSessionListener(SessionListener
the SessionListener instance that should be notified
for session events listener)Add a session event listener to this component. |
| public void | |
| public void | expire()
Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired. |
| public String | |
| public long | |
| public long | Returns: the creation time for this session, bypassing the session validity checks.
|
| public String | |
| public String | |
| public long | |
| public long | |
| public long | Returns: 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. This one gets updated whenever a request finishes.
|
| public long | |
| public Manager | |
| public int | Returns: 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.
|
| public Object | |
| public Iterator | Returns: an Iterator containing the String names of all notes bindings that exist for this session.
|
| public Principal | Returns: the authenticated Principal that is associated with this Session. This provides anAuthenticator with a means to cache a
previously authenticated Principal, and avoid potentially expensive
Realm.authenticate() calls on every request. If there
is no current associated Principal, return null.
|
| public HttpSession | |
| public long | Returns: 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. This one gets updated whenever a request starts.
|
| public long | |
| public boolean | Returns: true if distribution is supported, otherwise falseThe attribute name name, Object The attribute value value)Does the session implementation support the distributing of the given attribute? |
| public boolean | |
| public void | recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object. |
| public void | removeNote(String
Name of the note to be removed name)Remove any object bound to the specified name in the internal notes for this session. |
| public void | removeSessionListener(SessionListener
remove the session listener, which will no longer be
notified listener)Remove a session event listener from this component. |
| public void | setAuthType(String
The new cached authentication type authType)Set the authentication type used to authenticate our cached Principal, if any. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setMaxInactiveInterval(int
The new maximum interval interval)Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. |
| public void | |
| public void | |
| public void | setPrincipal(Principal
The new Principal, or principal)null if noneSet the authenticated Principal that is associated with this Session. |
| public void | |
| public void | tellChangedSessionId(String
new session ID newId, String old session ID oldId, boolean Should any associated sessionListeners be
notified that session ID has been changed? notifySessionListeners, boolean Should any associated ContainerListeners
be notified that session ID has been changed? notifyContainerListeners)Inform the listeners about the change session ID. |
| SESSION_ACTIVATED_EVENT | back to summary |
|---|---|
| public static final String SESSION_ACTIVATED_EVENT The SessionEvent event type when a session is activated. | |
| SESSION_CREATED_EVENT | back to summary |
|---|---|
| public static final String SESSION_CREATED_EVENT The SessionEvent event type when a session is created. | |
| SESSION_DESTROYED_EVENT | back to summary |
|---|---|
| public static final String SESSION_DESTROYED_EVENT The SessionEvent event type when a session is destroyed. | |
| SESSION_PASSIVATED_EVENT | back to summary |
|---|---|
| public static final String SESSION_PASSIVATED_EVENT The SessionEvent event type when a session is passivated. | |
| access | back to summary |
|---|---|
| public void access() 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. | |
| addSessionListener | back to summary |
|---|---|
| public void addSessionListener(SessionListener listener) Add a session event listener to this component.
| |
| endAccess | back to summary |
|---|---|
| public void endAccess() End access to the session. | |
| expire | back to summary |
|---|---|
| public void expire() Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired. | |
| getAuthType | back to summary |
|---|---|
public String getAuthType()
| |
| getCreationTime | back to summary |
|---|---|
public long getCreationTime()
| |
| getCreationTimeInternal | back to summary |
|---|---|
public long getCreationTimeInternal()
| |
| getId | back to summary |
|---|---|
public String getId()
| |
| getIdInternal | back to summary |
|---|---|
public String getIdInternal()
| |
| getIdleTime | back to summary |
|---|---|
public long getIdleTime()
| |
| getIdleTimeInternal | back to summary |
|---|---|
public long getIdleTimeInternal()
| |
| getLastAccessedTime | back to summary |
|---|---|
public long getLastAccessedTime()
| |
| getLastAccessedTimeInternal | back to summary |
|---|---|
public long getLastAccessedTimeInternal()
| |
| getManager | back to summary |
|---|---|
public Manager getManager()
| |
| getMaxInactiveInterval | back to summary |
|---|---|
public int getMaxInactiveInterval()
| |
| getNote | back to summary |
|---|---|
| public Object getNote(String name) | |
| getNoteNames | back to summary |
|---|---|
| public Iterator | |
| getPrincipal | back to summary |
|---|---|
public Principal getPrincipal()
| |
| getSession | back to summary |
|---|---|
public HttpSession getSession()
| |
| getThisAccessedTime | back to summary |
|---|---|
public long getThisAccessedTime()
| |
| getThisAccessedTimeInternal | back to summary |
|---|---|
public long getThisAccessedTimeInternal()
| |
| isAttributeDistributable | back to summary |
|---|---|
| public boolean isAttributeDistributable(String name, Object value) Does the session implementation support the distributing of the given
attribute? If the Manager is marked as distributable, then this method
must be used to check attributes before adding them to a session and
an
Note that the | |
| isValid | back to summary |
|---|---|
public boolean isValid()
| |
| recycle | back to summary |
|---|---|
| public void recycle() Release all object references, and initialize instance variables, in preparation for reuse of this object. | |
| removeNote | back to summary |
|---|---|
| public void removeNote(String name) Remove any object bound to the specified name in the internal notes for this session.
| |
| removeSessionListener | back to summary |
|---|---|
| public void removeSessionListener(SessionListener listener) Remove a session event listener from this component.
| |
| setAuthType | back to summary |
|---|---|
| public void setAuthType(String authType) Set the authentication type used to authenticate our cached Principal, if any.
| |
| setCreationTime | back to summary |
|---|---|
| public void setCreationTime(long time) Set the creation time for this session. This method is called by the Manager when an existing Session instance is reused.
| |
| setId | back to summary |
|---|---|
| public void setId(String id) Set the session identifier for this session and notifies any associated listeners that a new session has been created.
| |
| setId | back to summary |
|---|---|
| public void setId(String id, boolean notify) Set the session identifier for this session and optionally notifies any associated listeners that a new session has been created.
| |
| setManager | back to summary |
|---|---|
| public void setManager(Manager manager) Set the Manager within which this Session is valid.
| |
| setMaxInactiveInterval | back to summary |
|---|---|
| public void setMaxInactiveInterval(int interval) 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.
| |
| setNew | back to summary |
|---|---|
| public void setNew(boolean isNew) Set the
| |
| setNote | back to summary |
|---|---|
| public void setNote(String name, Object value) Bind an object to a specified name in the internal notes associated with this session, replacing any existing binding for this name. | |
| setPrincipal | back to summary |
|---|---|
| public void setPrincipal(Principal principal) Set the authenticated Principal that is associated with this Session.
This provides an
| |
| setValid | back to summary |
|---|---|
| public void setValid(boolean isValid) Set the
| |
| tellChangedSessionId | back to summary |
|---|---|
| public void tellChangedSessionId(String newId, String oldId, boolean notifySessionListeners, boolean notifyContainerListeners) Inform the listeners about the change session ID. | |