Package io.undertow.servlet.handlers
Class ServletInitialHandler
- java.lang.Object
-
- io.undertow.servlet.handlers.ServletInitialHandler
-
- All Implemented Interfaces:
HttpHandler,ServletDispatcher
public class ServletInitialHandler extends Object implements 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
Constructors Constructor Description ServletInitialHandler(ServletPathMatches paths, HttpHandler next, Deployment deployment, ServletContextImpl servletContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispatchMockRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Dispatches a mock request to the servlet container.voiddispatchToPath(HttpServerExchange exchange, ServletPathMatch pathInfo, jakarta.servlet.DispatcherType dispatcherType)Dispatches a servlet request to the specified servlet path, changing the current pathvoiddispatchToServlet(HttpServerExchange exchange, ServletChain servletchain, jakarta.servlet.DispatcherType dispatcherType)Dispatches a servlet request to the specified servlet, without changing the current pathHttpHandlergetNext()voidhandleRequest(HttpServerExchange exchange)
-
-
-
Constructor Detail
-
ServletInitialHandler
public ServletInitialHandler(ServletPathMatches paths, HttpHandler next, Deployment deployment, ServletContextImpl servletContext)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
- Specified by:
handleRequestin interfaceHttpHandler- Throws:
Exception
-
dispatchToPath
public void dispatchToPath(HttpServerExchange exchange, ServletPathMatch pathInfo, jakarta.servlet.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:
ServletRequestContext
-
dispatchToServlet
public void dispatchToServlet(HttpServerExchange exchange, ServletChain servletchain, jakarta.servlet.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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletExceptionDescription copied from interface:ServletDispatcherDispatches a mock request to the servlet container.- Specified by:
dispatchMockRequestin interfaceServletDispatcher- Parameters:
request- The requestresponse- The response- Throws:
jakarta.servlet.ServletException
-
getNext
public HttpHandler getNext()
-
-