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
IllegalStateException
protected boolean checkExpiry(long time)
time
- public AbstractSession getSession()
getSession
in interface AbstractSessionManager.SessionIf
public long getAccessed()
public abstract int getAttributes()
public long getCookieSetTime()
public long getCreationTime() throws IllegalStateException
getCreationTime
in interface HttpSession
IllegalStateException
public String getId() throws IllegalStateException
getId
in interface HttpSession
IllegalStateException
public String getNodeId()
public String getClusterId()
public long getLastAccessedTime() throws IllegalStateException
getLastAccessedTime
in interface HttpSession
IllegalStateException
public void setLastAccessedTime(long time)
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface HttpSession
public ServletContext getServletContext()
getServletContext
in interface HttpSession
@Deprecated public HttpSessionContext getSessionContext() throws IllegalStateException
getSessionContext
in interface HttpSession
IllegalStateException
@Deprecated public Object getValue(String name) throws IllegalStateException
getAttribute(java.lang.String)
getValue
in interface HttpSession
IllegalStateException
public 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
IllegalStateException
public void invalidate() throws IllegalStateException
invalidate
in interface HttpSession
IllegalStateException
protected void doInvalidate() throws IllegalStateException
IllegalStateException
public abstract void clearAttributes()
public boolean isIdChanged()
public boolean isNew() throws IllegalStateException
isNew
in interface HttpSession
IllegalStateException
@Deprecated public void putValue(String name, Object value) throws IllegalStateException
setAttribute(java.lang.String, java.lang.Object)
putValue
in interface HttpSession
IllegalStateException
public void removeAttribute(String name)
removeAttribute
in interface HttpSession
@Deprecated public void removeValue(String name) throws IllegalStateException
removeAttribute(java.lang.String)
removeValue
in interface HttpSession
IllegalStateException
public Enumeration<String> getAttributeNames()
getAttributeNames
in interface HttpSession
@Deprecated public String[] getValueNames() throws IllegalStateException
getAttributeNames()
getValueNames
in interface HttpSession
IllegalStateException
public abstract Enumeration<String> doGetAttributeNames()
public Object getAttribute(String name)
getAttribute
in interface HttpSession
public void setAttribute(String name, Object value)
setAttribute
in interface HttpSession
protected 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 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-2015 Webtide. All Rights Reserved.