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 classstatic final classstatic 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()voidhandleRequest(HttpServerExchange exchange) Handle the request.voidsetNext(HttpHandler next)
-
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
-
handleRequest
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin 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
-