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