T
- request handler type.@Contract(threading=SAFE_CONDITIONAL) public class RequestHandlerRegistry<T> extends Object implements HttpRequestMapper<T>
Constructor and Description |
---|
RequestHandlerRegistry() |
RequestHandlerRegistry(String canonicalHostName,
Supplier<LookupRegistry<T>> registrySupplier) |
RequestHandlerRegistry(String canonicalHostName,
UriPatternType patternType) |
RequestHandlerRegistry(UriPatternType patternType) |
Modifier and Type | Method and Description |
---|---|
void |
register(String hostname,
String uriPattern,
T object) |
T |
resolve(HttpRequest request,
HttpContext context)
Resolves a handler matching the given request.
|
public RequestHandlerRegistry(String canonicalHostName, Supplier<LookupRegistry<T>> registrySupplier)
public RequestHandlerRegistry(String canonicalHostName, UriPatternType patternType)
public RequestHandlerRegistry(UriPatternType patternType)
public RequestHandlerRegistry()
public T resolve(HttpRequest request, HttpContext context) throws MisdirectedRequestException
HttpRequestMapper
resolve
in interface HttpRequestMapper<T>
request
- the request to map to a handlernull
if no match
is found.MisdirectedRequestException
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.