Package io.undertow.server.handlers
Class PredicateHandler
- java.lang.Object
-
- io.undertow.server.handlers.PredicateHandler
-
- All Implemented Interfaces:
HttpHandler
public class PredicateHandler extends Object implements HttpHandler
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description PredicateHandler(Predicate predicate, HttpHandler trueHandler, HttpHandler falseHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Constructor Detail
-
PredicateHandler
public PredicateHandler(Predicate predicate, HttpHandler trueHandler, HttpHandler falseHandler)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getPredicate
public Predicate getPredicate()
-
setPredicate
public PredicateHandler setPredicate(Predicate predicate)
-
getTrueHandler
public HttpHandler getTrueHandler()
-
setTrueHandler
public PredicateHandler setTrueHandler(HttpHandler trueHandler)
-
getFalseHandler
public HttpHandler getFalseHandler()
-
setFalseHandler
public PredicateHandler setFalseHandler(HttpHandler falseHandler)
-
-