public class SessionHandler extends HandlerWrapper
_string
Constructor and Description |
---|
SessionHandler()
Constructor.
|
SessionHandler(SessionManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventListener listener) |
void |
clearEventListeners() |
protected void |
doStart() |
protected void |
doStop() |
SessionManager |
getSessionManager() |
void |
handle(String target,
HttpServletRequest request,
HttpServletResponse response,
int dispatch)
Handle a request.
|
protected void |
setRequestedId(HttpServletRequest request,
int dispatch)
Look for a requested session ID in cookies and URI parameters
|
void |
setServer(Server server) |
void |
setSessionManager(SessionManager sessionManager) |
addHandler, expandChildren, getHandler, removeHandler, setHandler
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
destroy, getServer, toString
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public SessionHandler()
public SessionHandler(SessionManager manager)
manager
- The session managerpublic SessionManager getSessionManager()
public void setSessionManager(SessionManager sessionManager)
sessionManager
- The sessionManager to set.public void setServer(Server server)
setServer
in interface Handler
setServer
in class HandlerWrapper
protected void doStart() throws Exception
doStart
in class HandlerWrapper
Exception
protected void doStop() throws Exception
doStop
in class HandlerWrapper
Exception
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException
Handler
handle
in interface Handler
handle
in class HandlerWrapper
target
- The target of the request - either a URI or a name.request
- The request either as the Request
object or a wrapper of that request. The HttpConnection.getCurrentConnection()
method can be used access the Request object if required.response
- The response as the Response
object or a wrapper of that request. The HttpConnection.getCurrentConnection()
method can be used access the Response object if required.dispatch
- The dispatch mode: Handler.REQUEST
, Handler.FORWARD
, Handler.INCLUDE
, Handler.ERROR
IOException
ServletException
protected void setRequestedId(HttpServletRequest request, int dispatch)
request
- dispatch
- public void addEventListener(EventListener listener)
listener
- public void clearEventListeners()
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.