public abstract class MappingAdapter extends java.lang.Object implements HandlerAdapter, Patterns
FORWARD, PAIR_KEY, PAIR_KEY_VALUE, PAIR_NO_KEY, PAIR_NO_VALUE, PAIR_VALUE, PATH, PATH_0, PATH_1, REDIRECT, WORD| Constructor and Description |
|---|
MappingAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static Mapping |
findMappingByMethod(java.util.List<Mapping> mappings,
HttpMethod method) |
static java.util.List<HttpMethod> |
findSupportMethods(java.util.List<Mapping> mappings) |
RequestHandler |
getHandler(HttpRequest request)
Get the handler that handles the current request.
|
protected abstract java.lang.Object |
getHost()
Get the host of the
HandlerAdapter. |
protected abstract java.util.Map<Mapping,RequestHandler> |
getMappingMap()
Get all the mappings for this adapter.
|
boolean |
intercept(HttpRequest request)
Whether to intercept the current request.
|
public boolean intercept(HttpRequest request)
HandlerAdapterintercept in interface HandlerAdapterrequest - current request.public RequestHandler getHandler(HttpRequest request)
HandlerAdaptergetHandler in interface HandlerAdapterrequest - current request.protected abstract java.util.Map<Mapping,RequestHandler> getMappingMap()
protected abstract java.lang.Object getHost()
HandlerAdapter.public static java.util.List<HttpMethod> findSupportMethods(java.util.List<Mapping> mappings)
public static Mapping findMappingByMethod(java.util.List<Mapping> mappings, HttpMethod method)