public class SessionManager extends AbstractXmlElement implements CleanupThread.Cleaner
The Session Manager identifies users across HTTP requests using a session cookie.
The name of the session cookie can be specified using the cookieName attribute. The default name is "SESSIONID".
The session timeout can be specified in milliseconds using the timeout attribute. The default timeout is 5 minutes.
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionManager.Session |
| Constructor and Description |
|---|
SessionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
SessionManager.Session |
createSession(Exchange exc) |
String |
getCookieName() |
String |
getDomain() |
SessionManager.Session |
getOrCreateSession(Exchange exc) |
SessionManager.Session |
getSession(Exchange exc) |
long |
getTimeout() |
void |
init(Router router) |
protected void |
parseAttributes(XMLStreamReader token) |
void |
postProcess(Exchange exc)
Sets the Session Cookie on the response, if necessary (e.g.
|
void |
removeSession(Exchange exc) |
void |
removeSession(SessionManager.Session s) |
void |
setCookieName(String cookieName) |
void |
setDomain(String domain) |
void |
setTimeout(long timeout) |
doAfterParsing, getBoolean, getElementName, move2RootElementIfNeeded, parse, parseCharacters, parseChildren, toXml, write, writeIfNotNullprotected void parseAttributes(XMLStreamReader token) throws Exception
parseAttributes in class AbstractXmlElementExceptionpublic void init(Router router)
public void postProcess(Exchange exc)
public SessionManager.Session getOrCreateSession(Exchange exc)
public void removeSession(Exchange exc)
public void removeSession(SessionManager.Session s)
public SessionManager.Session getSession(Exchange exc)
public SessionManager.Session createSession(Exchange exc)
public void cleanup()
cleanup in interface CleanupThread.Cleanerpublic String getCookieName()
public void setCookieName(String cookieName)
public long getTimeout()
public void setTimeout(long timeout)
public String getDomain()
public void setDomain(String domain)
Copyright © 2019. All Rights Reserved.