public class RoutingHandler extends Object implements HttpHandler
Constructor and Description |
---|
RoutingHandler() |
RoutingHandler(boolean rewriteQueryParameters) |
public RoutingHandler(boolean rewriteQueryParameters)
public RoutingHandler()
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public RoutingHandler add(String method, String template, HttpHandler handler)
public RoutingHandler add(HttpString method, String template, HttpHandler handler)
public RoutingHandler get(String template, HttpHandler handler)
public RoutingHandler post(String template, HttpHandler handler)
public RoutingHandler put(String template, HttpHandler handler)
public RoutingHandler delete(String template, HttpHandler handler)
public RoutingHandler add(String method, String template, Predicate predicate, HttpHandler handler)
public RoutingHandler add(HttpString method, String template, Predicate predicate, HttpHandler handler)
public RoutingHandler get(String template, Predicate predicate, HttpHandler handler)
public RoutingHandler post(String template, Predicate predicate, HttpHandler handler)
public RoutingHandler put(String template, Predicate predicate, HttpHandler handler)
public RoutingHandler delete(String template, Predicate predicate, HttpHandler handler)
public RoutingHandler addAll(RoutingHandler routingHandler)
public RoutingHandler remove(HttpString method, String path)
method
- The method to removepath
- the path tempate to removepublic RoutingHandler remove(String path)
path
- the path tempate to removepublic HttpHandler getFallbackHandler()
public RoutingHandler setFallbackHandler(HttpHandler fallbackHandler)
fallbackHandler
- Handler that will be called when no match was found and invalid method handler can't be
invoked.public HttpHandler getInvalidMethodHandler()
public RoutingHandler setInvalidMethodHandler(HttpHandler invalidMethodHandler)
invalidMethodHandler
- Handler that will be called when this instance can not match the http method but can
match another http method.Copyright © 2017 JBoss by Red Hat. All rights reserved.