|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.session.StandardSession org.apache.catalina.cluster.session.ReplicatedSession
Field Summary | |
protected boolean |
isDirty
|
Fields inherited from class org.apache.catalina.session.StandardSession |
accessCount, attributes, authType, containerEventMethod, containerEventTypes, creationTime, EMPTY_ARRAY, expiring, facade, id, info, isNew, isValid, lastAccessedTime, listeners, manager, maxInactiveInterval, NOT_SERIALIZED, notes, principal, sessionContext, sm, support, thisAccessedTime |
Fields inherited from interface org.apache.catalina.Session |
SESSION_ACTIVATED_EVENT, SESSION_CREATED_EVENT, SESSION_DESTROYED_EVENT, SESSION_PASSIVATED_EVENT |
Constructor Summary | |
ReplicatedSession(Manager manager)
|
Method Summary | |
void |
expire()
Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired. |
int |
getAccessCount()
|
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. |
long |
getLastAccessWasDistributed()
|
long |
getThisAccessedTime()
|
void |
invalidate()
Invalidates this session and unbinds any objects bound to it. |
boolean |
isDirty()
|
boolean |
isPrimarySession()
returns true if this session is the primary session, if that is the case, the manager can expire it upon timeout. |
protected void |
log(java.lang.String message)
Implements a log method to log through the manager |
protected void |
log(java.lang.String message,
java.lang.Throwable x)
|
void |
readObjectData(java.io.ObjectInputStream stream)
Read a serialized version of the contents of this session object from the specified object input stream, without requiring that the StandardSession itself have been serialized. |
void |
removeAttribute(java.lang.String name)
Remove the object bound with the specified name from this session. |
void |
removeAttribute(java.lang.String name,
boolean notify)
see parent description, plus we also notify other nodes in the cluster |
void |
setAccessCount(int accessCount)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an attribute and notifies the other nodes in the cluster |
void |
setId(java.lang.String id,
boolean tellNew)
Set the session identifier for this session and optionally notifies any associated listeners that a new session has been created. |
void |
setIsDirty(boolean dirty)
|
void |
setLastAccessedTime(long lastAccessedTime)
|
void |
setLastAccessWasDistributed(long time)
|
void |
setManager(SimpleTcpReplicationManager mgr)
Sets the manager for this session |
void |
setMaxInactiveInterval(int interval)
Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. |
void |
setPrimarySession(boolean primarySession)
Sets whether this is the primary session or not. |
void |
setPrincipal(java.security.Principal principal)
Set the authenticated Principal that is associated with this Session. |
void |
setThisAccessedTime(long thisAccessedTime)
|
java.lang.String |
toString()
Return a string representation of this object. |
void |
writeObjectData(java.io.ObjectOutputStream stream)
Write a serialized version of the contents of this session object to the specified object output stream, without requiring that the StandardSession itself have been serialized. |
Methods inherited from class org.apache.catalina.session.StandardSession |
access, activate, addSessionListener, endAccess, evaluateIfValid, exclude, expire, fireContainerEvent, fireSessionEvent, getAttribute, getAttributeNames, getAuthType, getCreationTime, getId, getIdInternal, getInfo, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, getPrincipal, getServletContext, getSession, getSessionContext, getValue, getValueNames, isNew, isValid, keys, passivate, putValue, recycle, removeAttributeInternal, removeNote, removeSessionListener, removeValue, setAttribute, setAuthType, setCreationTime, setId, setManager, setNew, setNote, setValid, tellNew |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.catalina.Session |
access, addSessionListener, endAccess, getAuthType, getCreationTime, getId, getIdInternal, getInfo, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, getPrincipal, getSession, isValid, recycle, removeNote, removeSessionListener, setAuthType, setCreationTime, setId, setManager, setNew, setNote, setValid |
Methods inherited from interface javax.servlet.http.HttpSession |
getAttribute, getAttributeNames, getCreationTime, getId, getMaxInactiveInterval, getServletContext, getSessionContext, getValue, getValueNames, isNew, putValue, removeValue |
Field Detail |
protected boolean isDirty
Constructor Detail |
public ReplicatedSession(Manager manager)
Method Detail |
public boolean isDirty()
public void setIsDirty(boolean dirty)
public void setLastAccessWasDistributed(long time)
public long getLastAccessWasDistributed()
public void removeAttribute(java.lang.String name)
StandardSession
After this method executes, and if the object implements
HttpSessionBindingListener
, the container calls
valueUnbound()
on the object.
removeAttribute
in interface javax.servlet.http.HttpSession
removeAttribute
in class StandardSession
name
- Name of the object to remove from this session.public void removeAttribute(java.lang.String name, boolean notify)
removeAttribute
in class StandardSession
name
- Name of the object to remove from this session.notify
- Should we notify interested listeners that this
attribute is being removed?public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.http.HttpSession
setAttribute
in class StandardSession
name
- Name to which the object is bound, cannot be nullvalue
- Object to be bound, cannot be nullpublic void setMaxInactiveInterval(int interval)
Session
setMaxInactiveInterval
in interface Session
setMaxInactiveInterval
in class StandardSession
interval
- The new maximum intervalpublic void setManager(SimpleTcpReplicationManager mgr)
mgr
- - the servers InMemoryReplicationManagerpublic void setPrincipal(java.security.Principal principal)
Authenticator
with a means to cache a
previously authenticated Principal, and avoid potentially expensive
Realm.authenticate()
calls on every request.
setPrincipal
in interface Session
setPrincipal
in class StandardSession
principal
- The new Principal, or null
if nonepublic void expire()
Session
expire
in interface Session
expire
in class StandardSession
public void invalidate()
StandardSession
invalidate
in interface javax.servlet.http.HttpSession
invalidate
in class StandardSession
public void readObjectData(java.io.ObjectInputStream stream) throws java.lang.ClassNotFoundException, java.io.IOException
readObjectData
in class StandardSession
stream
- The object input stream to read from
java.lang.ClassNotFoundException
- if an unknown class is specified
java.io.IOException
- if an input/output error occurspublic void writeObjectData(java.io.ObjectOutputStream stream) throws java.io.IOException
writeObjectData
in class StandardSession
stream
- The object output stream to write to
java.io.IOException
- if an input/output error occurspublic void setId(java.lang.String id, boolean tellNew)
Session
setId
in interface Session
setId
in class StandardSession
public boolean isPrimarySession()
isPrimarySession
in interface ClusterSession
public void setPrimarySession(boolean primarySession)
setPrimarySession
in interface ClusterSession
primarySession
- Flag valueprotected void log(java.lang.String message)
protected void log(java.lang.String message, java.lang.Throwable x)
public java.lang.String toString()
StandardSession
toString
in class StandardSession
public int getAccessCount()
public void setAccessCount(int accessCount)
public long getLastAccessedTime()
Session
getLastAccessedTime
in interface Session
getLastAccessedTime
in class StandardSession
public void setLastAccessedTime(long lastAccessedTime)
public long getThisAccessedTime()
public void setThisAccessedTime(long thisAccessedTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |