public abstract class AbstractSession extends Object implements AbstractSessionManager.SessionIf
Implements HttpSession from the javax.servlet package.
| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_KNOWN_ONLY_TO_AUTHENTICATED |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSession(AbstractSessionManager abstractSessionManager,
HttpServletRequest request) |
protected |
AbstractSession(AbstractSessionManager abstractSessionManager,
long created,
long accessed,
String clusterId) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
access(long time) |
void |
bindValue(String name,
Object value)
If value implements HttpSessionBindingListener, call valueBound()
|
protected void |
callSessionAttributeListeners(String name,
Object newValue,
Object oldValue)
Call binding and attribute listeners based on the new and old
values of the attribute.
|
protected Object |
changeAttribute(String name,
Object value)
Either set (perhaps replace) or remove the value of the attribute
in the session.
|
protected boolean |
checkExpiry(long time)
Check to see if session has expired as at the time given.
|
protected void |
checkValid()
asserts that the session is valid
|
abstract void |
clearAttributes() |
protected void |
complete() |
protected void |
cookieSet() |
void |
didActivate() |
abstract Object |
doGet(String name) |
abstract Enumeration<String> |
doGetAttributeNames() |
protected void |
doInvalidate() |
abstract Object |
doPutOrRemove(String name,
Object value) |
long |
getAccessed() |
Object |
getAttribute(String name) |
abstract Map<String,Object> |
getAttributeMap() |
Enumeration<String> |
getAttributeNames() |
abstract int |
getAttributes() |
String |
getClusterId() |
long |
getCookieSetTime() |
long |
getCreationTime() |
String |
getId() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
abstract Set<String> |
getNames() |
String |
getNodeId() |
int |
getRequests() |
ServletContext |
getServletContext() |
AbstractSession |
getSession() |
HttpSessionContext |
getSessionContext()
Deprecated.
|
SessionManager |
getSessionManager() |
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 |
renewId(HttpServletRequest request) |
void |
setAttribute(String name,
Object value) |
protected void |
setClusterId(String clusterId) |
void |
setIdChanged(boolean changed) |
void |
setLastAccessedTime(long time) |
void |
setMaxInactiveInterval(int secs) |
protected void |
setNodeId(String nodeId) |
void |
setRequests(int requests) |
protected void |
timeout() |
String |
toString() |
void |
unbindValue(String name,
Object value)
If value implements HttpSessionBindingListener, call valueUnbound()
|
protected boolean |
updateAttribute(String name,
Object value)
Deprecated.
use changeAttribute(String,Object) instead
|
void |
willPassivate() |
public static final String SESSION_KNOWN_ONLY_TO_AUTHENTICATED
protected AbstractSession(AbstractSessionManager abstractSessionManager, HttpServletRequest request)
protected AbstractSession(AbstractSessionManager abstractSessionManager, long created, long accessed, String clusterId)
protected void checkValid()
throws IllegalStateException
IllegalStateExceptionprotected boolean checkExpiry(long time)
time - public AbstractSession getSession()
getSession in interface AbstractSessionManager.SessionIfpublic long getAccessed()
public abstract int getAttributes()
public long getCookieSetTime()
public long getCreationTime()
throws IllegalStateException
getCreationTime in interface HttpSessionIllegalStateExceptionpublic String getId() throws IllegalStateException
getId in interface HttpSessionIllegalStateExceptionpublic String getNodeId()
public String getClusterId()
public long getLastAccessedTime()
throws IllegalStateException
getLastAccessedTime in interface HttpSessionIllegalStateExceptionpublic void setLastAccessedTime(long time)
public int getMaxInactiveInterval()
getMaxInactiveInterval in interface HttpSessionpublic ServletContext getServletContext()
getServletContext in interface HttpSession@Deprecated public HttpSessionContext getSessionContext() throws IllegalStateException
getSessionContext in interface HttpSessionIllegalStateException@Deprecated public Object getValue(String name) throws IllegalStateException
getAttribute(java.lang.String)getValue in interface HttpSessionIllegalStateExceptionpublic void renewId(HttpServletRequest request)
public SessionManager getSessionManager()
protected void setClusterId(String clusterId)
protected void setNodeId(String nodeId)
protected boolean access(long time)
protected void complete()
protected void timeout()
throws IllegalStateException
IllegalStateExceptionpublic void invalidate()
throws IllegalStateException
invalidate in interface HttpSessionIllegalStateExceptionprotected void doInvalidate()
throws IllegalStateException
IllegalStateExceptionpublic abstract void clearAttributes()
public boolean isIdChanged()
public boolean isNew()
throws IllegalStateException
isNew in interface HttpSessionIllegalStateException@Deprecated public void putValue(String name, Object value) throws IllegalStateException
setAttribute(java.lang.String, java.lang.Object)putValue in interface HttpSessionIllegalStateExceptionpublic void removeAttribute(String name)
removeAttribute in interface HttpSession@Deprecated public void removeValue(String name) throws IllegalStateException
removeAttribute(java.lang.String)removeValue in interface HttpSessionIllegalStateExceptionpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface HttpSession@Deprecated public String[] getValueNames() throws IllegalStateException
getAttributeNames()getValueNames in interface HttpSessionIllegalStateExceptionpublic abstract Enumeration<String> doGetAttributeNames()
public Object getAttribute(String name)
getAttribute in interface HttpSessionpublic void setAttribute(String name, Object value)
setAttribute in interface HttpSessionprotected boolean updateAttribute(String name, Object value)
name - value - protected Object changeAttribute(String name, Object value)
name - value - protected void callSessionAttributeListeners(String name, Object newValue, Object oldValue)
name - name of the attributenewValue - new value of the attributeoldValue - previous value of the attributepublic void setIdChanged(boolean changed)
public void setMaxInactiveInterval(int secs)
setMaxInactiveInterval in interface HttpSessionpublic 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-2015 Webtide. All Rights Reserved.