Package io.undertow.servlet.handlers
Class ServletInitialHandler
java.lang.Object
io.undertow.servlet.handlers.ServletInitialHandler
- All Implemented Interfaces:
HttpHandler,ServletDispatcher
This must be the initial handler in the blocking servlet chain. This sets up the request and response objects,
and attaches them the to exchange.
- Author:
- Stuart Douglas
-
Constructor Summary
ConstructorsConstructorDescriptionServletInitialHandler(ServletPathMatches paths, HttpHandler next, Deployment deployment, ServletContextImpl servletContext) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchMockRequest(HttpServletRequest request, HttpServletResponse response) Dispatches a mock request to the servlet container.voiddispatchToPath(HttpServerExchange exchange, ServletPathMatch pathInfo, DispatcherType dispatcherType) Dispatches a servlet request to the specified servlet path, changing the current pathvoiddispatchToServlet(HttpServerExchange exchange, ServletChain servletchain, DispatcherType dispatcherType) Dispatches a servlet request to the specified servlet, without changing the current pathgetNext()voidhandleRequest(HttpServerExchange exchange) Handle the request.
-
Constructor Details
-
ServletInitialHandler
public ServletInitialHandler(ServletPathMatches paths, HttpHandler next, Deployment deployment, ServletContextImpl servletContext)
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
Exception
-
dispatchToPath
public void dispatchToPath(HttpServerExchange exchange, ServletPathMatch pathInfo, DispatcherType dispatcherType) throws Exception Description copied from interface:ServletDispatcherDispatches a servlet request to the specified servlet path, changing the current path- Specified by:
dispatchToPathin interfaceServletDispatcher- Throws:
Exception- See Also:
-
dispatchToServlet
public void dispatchToServlet(HttpServerExchange exchange, ServletChain servletchain, DispatcherType dispatcherType) throws Exception Description copied from interface:ServletDispatcherDispatches a servlet request to the specified servlet, without changing the current path- Specified by:
dispatchToServletin interfaceServletDispatcher- Throws:
Exception
-
dispatchMockRequest
public void dispatchMockRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException Description copied from interface:ServletDispatcherDispatches a mock request to the servlet container.- Specified by:
dispatchMockRequestin interfaceServletDispatcher- Parameters:
request- The requestresponse- The response- Throws:
ServletException
-
getNext
-