Package io.undertow.predicate
Class PredicatesHandler
java.lang.Object
io.undertow.predicate.PredicatesHandler
- All Implemented Interfaces:
HttpHandler
Handler that can deal with a large number of predicates. chaining together a large number of
PredicatesHandler.Holder
instances will make the stack grow to large, so this class is used that can deal with a large number of predicates.- Author:
- Stuart Douglas
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttachmentKey<Boolean>
static done marker.static final AttachmentKey<Boolean>
-
Constructor Summary
ConstructorsConstructorDescriptionPredicatesHandler
(HttpHandler next) PredicatesHandler
(HttpHandler next, boolean outerHandler) -
Method Summary
Modifier and TypeMethodDescriptionaddPredicatedHandler
(Predicate predicate, HandlerWrapper handlerWrapper) Adds a new predicated handler.addPredicatedHandler
(Predicate predicate, HandlerWrapper handlerWrapper, HandlerWrapper elseBranch) Adds a new predicated handler.addPredicatedHandler
(PredicatedHandler handler) getNext()
void
handleRequest
(HttpServerExchange exchange) Handle the request.void
setNext
(HttpHandler next) toString()
-
Field Details
-
DONE
static done marker. If this is attached to the exchange it will drop out immediately. -
RESTART
-
-
Constructor Details
-
PredicatesHandler
-
PredicatesHandler
-
-
Method Details
-
toString
-
handleRequest
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
addPredicatedHandler
public PredicatesHandler addPredicatedHandler(Predicate predicate, HandlerWrapper handlerWrapper, HandlerWrapper elseBranch) Adds a new predicated handler.- Parameters:
predicate
-handlerWrapper
-
-
addPredicatedHandler
Adds a new predicated handler.- Parameters:
predicate
-handlerWrapper
-
-
addPredicatedHandler
-
setNext
-
getNext
-