public abstract class AbstractSession extends Object implements AbstractSessionManager.SessionIf
Implements HttpSession
from the javax.servlet
package.
Modifier | Constructor and Description |
---|---|
protected |
AbstractSession(AbstractSessionManager abstractSessionManager,
javax.servlet.http.HttpServletRequest request) |
protected |
AbstractSession(AbstractSessionManager abstractSessionManager,
long created,
long accessed,
String clusterId) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
access(long time) |
protected void |
addAttributes(Map<String,Object> map) |
void |
bindValue(String name,
Object value)
If value implements HttpSessionBindingListener, call valueBound()
|
protected void |
checkValid()
asserts that the session is valid
|
void |
clearAttributes() |
protected void |
complete() |
protected void |
cookieSet() |
void |
didActivate() |
protected Object |
doGet(String name) |
protected void |
doInvalidate() |
protected Object |
doPutOrRemove(String name,
Object value) |
long |
getAccessed() |
Object |
getAttribute(String name) |
protected Map<String,Object> |
getAttributeMap() |
Enumeration<String> |
getAttributeNames() |
int |
getAttributes() |
String |
getClusterId() |
long |
getCookieSetTime() |
long |
getCreationTime() |
String |
getId() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
Set<String> |
getNames() |
String |
getNodeId() |
int |
getRequests() |
javax.servlet.ServletContext |
getServletContext() |
AbstractSession |
getSession() |
javax.servlet.http.HttpSessionContext |
getSessionContext()
Deprecated.
|
Object |
getValue(String name)
Deprecated.
As of Version 2.2, this method is replaced by
getAttribute(java.lang.String) |
String[] |
getValueNames()
Deprecated.
As of Version 2.2, this method is replaced by
getAttributeNames() |
void |
invalidate() |
boolean |
isIdChanged() |
boolean |
isNew() |
boolean |
isValid() |
void |
putValue(String name,
Object value)
Deprecated.
As of Version 2.2, this method is replaced by
setAttribute(java.lang.String, java.lang.Object) |
void |
removeAttribute(String name) |
void |
removeValue(String name)
Deprecated.
As of Version 2.2, this method is replaced by
removeAttribute(java.lang.String) |
void |
setAttribute(String name,
Object value) |
void |
setIdChanged(boolean changed) |
void |
setMaxInactiveInterval(int secs) |
void |
setRequests(int requests) |
protected void |
timeout() |
String |
toString() |
void |
unbindValue(String name,
Object value)
If value implements HttpSessionBindingListener, call valueUnbound()
|
void |
willPassivate() |
protected AbstractSession(AbstractSessionManager abstractSessionManager, javax.servlet.http.HttpServletRequest request)
protected AbstractSession(AbstractSessionManager abstractSessionManager, long created, long accessed, String clusterId)
protected void checkValid() throws IllegalStateException
IllegalStateException
public AbstractSession getSession()
getSession
in interface AbstractSessionManager.SessionIf
public long getAccessed()
public Object getAttribute(String name)
getAttribute
in interface javax.servlet.http.HttpSession
public int getAttributes()
public Enumeration<String> getAttributeNames()
getAttributeNames
in interface javax.servlet.http.HttpSession
public long getCookieSetTime()
public long getCreationTime() throws IllegalStateException
getCreationTime
in interface javax.servlet.http.HttpSession
IllegalStateException
public String getId() throws IllegalStateException
getId
in interface javax.servlet.http.HttpSession
IllegalStateException
public String getNodeId()
public String getClusterId()
public long getLastAccessedTime() throws IllegalStateException
getLastAccessedTime
in interface javax.servlet.http.HttpSession
IllegalStateException
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.http.HttpSession
@Deprecated public javax.servlet.http.HttpSessionContext getSessionContext() throws IllegalStateException
getSessionContext
in interface javax.servlet.http.HttpSession
IllegalStateException
@Deprecated public Object getValue(String name) throws IllegalStateException
getAttribute(java.lang.String)
getValue
in interface javax.servlet.http.HttpSession
IllegalStateException
@Deprecated public String[] getValueNames() throws IllegalStateException
getAttributeNames()
getValueNames
in interface javax.servlet.http.HttpSession
IllegalStateException
protected boolean access(long time)
protected void complete()
protected void timeout() throws IllegalStateException
IllegalStateException
public void invalidate() throws IllegalStateException
invalidate
in interface javax.servlet.http.HttpSession
IllegalStateException
protected void doInvalidate() throws IllegalStateException
IllegalStateException
public void clearAttributes()
public boolean isIdChanged()
public boolean isNew() throws IllegalStateException
isNew
in interface javax.servlet.http.HttpSession
IllegalStateException
@Deprecated public void putValue(String name, Object value) throws IllegalStateException
setAttribute(java.lang.String, java.lang.Object)
putValue
in interface javax.servlet.http.HttpSession
IllegalStateException
public void removeAttribute(String name)
removeAttribute
in interface javax.servlet.http.HttpSession
@Deprecated public void removeValue(String name) throws IllegalStateException
removeAttribute(java.lang.String)
removeValue
in interface javax.servlet.http.HttpSession
IllegalStateException
public void setAttribute(String name, Object value)
setAttribute
in interface javax.servlet.http.HttpSession
public void setIdChanged(boolean changed)
public void setMaxInactiveInterval(int secs)
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public void bindValue(String name, Object value)
public boolean isValid()
protected void cookieSet()
public int getRequests()
public void setRequests(int requests)
public void unbindValue(String name, Object value)
public void willPassivate()
public void didActivate()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.