public class DefaultRoutingHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultRoutingHelper.LegacyJMX
Encapsulates legacy constants for JMX connector clients v1, v2 and v3.
|
static class |
DefaultRoutingHelper.RoutingContext
This inner class encapsulates the routing context.
|
Constructor and Description |
---|
DefaultRoutingHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsLegacyRoutingContext(RESTRequest request)
Quick check for legacy routing context (used from JMX connector)
|
static boolean |
containsRoutingContext(RESTRequest request)
Quick check for multiple routing context, without actually fetching all pieces
|
static DefaultRoutingHelper.RoutingContext |
getLegacyRoutingContext(RESTRequest request)
This helper method looks for the routing keys in the HTTP headers
|
static java.lang.String |
getQueryParameterValue(RESTRequest request,
java.lang.String name) |
static java.lang.String[] |
getQueryParameterValues(RESTRequest request,
java.lang.String name) |
static java.util.List<DefaultRoutingHelper.RoutingContext> |
getRoutingContext(RESTRequest request)
This helper method looks for the routing keys in the HTTP headers first, and then falls-back into looking at the query string.
|
void |
routeRequest(RESTRequest request,
RESTResponse response)
The target RESTHandler did not want to provide custom routing, so route the request to it.
|
void |
routeRequest(RESTRequest request,
RESTResponse response,
boolean legacyURI)
The target RESTHandler did not want to provide custom routing, so route the request to it.
|
static java.lang.String |
URLDecoder(java.lang.String name) |
public void routeRequest(RESTRequest request, RESTResponse response) throws java.io.IOException
java.io.IOException
public void routeRequest(RESTRequest request, RESTResponse response, boolean legacyURI) throws java.io.IOException
request
- response
- legacyURI
- whether or not the request is using the legacy /router URIjava.io.IOException
public static boolean containsLegacyRoutingContext(RESTRequest request)
public static boolean containsRoutingContext(RESTRequest request)
public static java.lang.String getQueryParameterValue(RESTRequest request, java.lang.String name)
public static java.lang.String[] getQueryParameterValues(RESTRequest request, java.lang.String name)
public static DefaultRoutingHelper.RoutingContext getLegacyRoutingContext(RESTRequest request)
httpServletRequest
- of the current requestpublic static java.lang.String URLDecoder(java.lang.String name)
public static java.util.List<DefaultRoutingHelper.RoutingContext> getRoutingContext(RESTRequest request)
httpServletRequest
- of the current request