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 and Description
`PredicateHandler(Predicate predicate, HttpHandler trueHandler, HttpHandler falseHandler)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 interface `HttpHandler`
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)