public class PredicatesHandler extends Object implements HttpHandler
PredicatesHandler.Holder
instances will make the stack grow to large, so this class is used that can deal with a large number of predicates.Modifier and Type | Class and Description |
---|---|
static class | PredicatesHandler.DoneHandlerBuilder |
static class | PredicatesHandler.RestartHandlerBuilder |
static class | PredicatesHandler.Wrapper |
Modifier and Type | Field and Description |
---|---|
static AttachmentKey<Boolean> | DONE static done marker. |
static AttachmentKey<Boolean> | RESTART |
Constructor and Description |
---|
PredicatesHandler(HttpHandler next) |
PredicatesHandler(HttpHandler next, boolean outerHandler) |
Modifier and Type | Method and Description |
---|---|
PredicatesHandler | addPredicatedHandler(PredicatedHandler handler) |
PredicatesHandler | addPredicatedHandler(Predicate predicate, HandlerWrapper handlerWrapper) Adds a new predicated handler. |
PredicatesHandler | addPredicatedHandler(Predicate predicate, HandlerWrapper handlerWrapper, HandlerWrapper elseBranch) Adds a new predicated handler. |
HttpHandler | getNext() |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
void | setNext(HttpHandler next) |
public static final AttachmentKey<Boolean> DONE
public static final AttachmentKey<Boolean> RESTART
public PredicatesHandler(HttpHandler next)
public PredicatesHandler(HttpHandler next, boolean outerHandler)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public PredicatesHandler addPredicatedHandler(Predicate predicate, HandlerWrapper handlerWrapper, HandlerWrapper elseBranch)
predicate
- handlerWrapper
- public PredicatesHandler addPredicatedHandler(Predicate predicate, HandlerWrapper handlerWrapper)
predicate
- handlerWrapper
- public PredicatesHandler addPredicatedHandler(PredicatedHandler handler)
public void setNext(HttpHandler next)
public HttpHandler getNext()
Copyright © 2017 JBoss by Red Hat. All rights reserved.