Package io.undertow.servlet.util
Class DispatchUtils
- java.lang.Object
-
- io.undertow.servlet.util.DispatchUtils
-
public final class DispatchUtils extends java.lang.Object
Utility class to manage the dispatching parsing of the path. The methods fill the exchange, request and response with the needed data for the dispatch.
- Author:
- rmartinc
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServletPathMatch
dispatchAsync(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext)
Perform an async dispatch to a path assigning everything needed to the request, response and exchange.static ServletPathMatch
dispatchError(java.lang.String path, java.lang.String servletName, java.lang.Throwable exception, java.lang.String message, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext)
Perform a error dispatch to a path assigning everything needed to the request, response and exchange.static ServletPathMatch
dispatchForward(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext)
Perform a forward dispatch to a path assigning everything needed to the request, response and exchange.static ServletPathMatch
dispatchInclude(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext)
Perform an include dispatch to a path assigning everything needed to the request, response and exchange.
-
-
-
Method Detail
-
dispatchForward
public static ServletPathMatch dispatchForward(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext) throws io.undertow.util.ParameterLimitException
Perform a forward dispatch to a path assigning everything needed to the request, response and exchange.- Parameters:
path
- The path to forward scoped to the ServletContextrequestImpl
- The requestresponseImpl
- The responseservletContext
- The servlet context- Returns:
- The match for the path
- Throws:
io.undertow.util.ParameterLimitException
- parameter limit exceeded
-
dispatchInclude
public static ServletPathMatch dispatchInclude(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext) throws io.undertow.util.ParameterLimitException
Perform an include dispatch to a path assigning everything needed to the request, response and exchange.- Parameters:
path
- The path to include scoped to the ServletContextrequestImpl
- The requestresponseImpl
- The responseservletContext
- The servlet context- Returns:
- The match for the path
- Throws:
io.undertow.util.ParameterLimitException
- parameter limit exceeded
-
dispatchError
public static ServletPathMatch dispatchError(java.lang.String path, java.lang.String servletName, java.lang.Throwable exception, java.lang.String message, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext) throws io.undertow.util.ParameterLimitException
Perform a error dispatch to a path assigning everything needed to the request, response and exchange.- Parameters:
path
- The path to forward scoped to the ServletContextservletName
- The servlet nameexception
- The exception for the errormessage
- The error messagerequestImpl
- The requestresponseImpl
- The responseservletContext
- The servlet context- Returns:
- The match for the path
- Throws:
io.undertow.util.ParameterLimitException
- parameter limit exceeded
-
dispatchAsync
public static ServletPathMatch dispatchAsync(java.lang.String path, HttpServletRequestImpl requestImpl, HttpServletResponseImpl responseImpl, ServletContextImpl servletContext) throws io.undertow.util.ParameterLimitException
Perform an async dispatch to a path assigning everything needed to the request, response and exchange.- Parameters:
path
- The path to include scoped to the ServletContextrequestImpl
- The requestresponseImpl
- The responseservletContext
- The servlet context- Returns:
- The match for the path
- Throws:
io.undertow.util.ParameterLimitException
- parameter limit exceeded
-
-