public class PredicateHandler extends Object implements HttpHandler
Constructor and Description |
---|
PredicateHandler(Predicate predicate,
HttpHandler trueHandler,
HttpHandler falseHandler) |
Modifier and Type | Method and Description |
---|---|
HttpHandler |
getFalseHandler() |
Predicate |
getPredicate() |
HttpHandler |
getTrueHandler() |
void |
handleRequest(HttpServerExchange exchange)
Handle the request.
|
PredicateHandler |
setFalseHandler(HttpHandler falseHandler) |
PredicateHandler |
setPredicate(Predicate predicate) |
PredicateHandler |
setTrueHandler(HttpHandler trueHandler) |
public PredicateHandler(Predicate predicate, HttpHandler trueHandler, HttpHandler falseHandler)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public Predicate getPredicate()
public PredicateHandler setPredicate(Predicate predicate)
public HttpHandler getTrueHandler()
public PredicateHandler setTrueHandler(HttpHandler trueHandler)
public HttpHandler getFalseHandler()
public PredicateHandler setFalseHandler(HttpHandler falseHandler)
Copyright © 2020 JBoss by Red Hat. All rights reserved.