public static class RequestPredicate.ConditionalHandler extends java.lang.Object implements Handler
Handler which executes provided logic only if provided condition is satisfied.
An instance can be created using RequestPredicate.thenApply(Handler) method.Handler.EntityHandler<T>| Modifier and Type | Method and Description |
|---|---|
void |
accept(ServerRequest req,
ServerResponse res)
|
Handler |
otherwise(Handler handler)
Creates new
Handler instance which executes this handler if condition was satisfied, otherwise
executes provided handler. |
public void accept(ServerRequest req, ServerResponse res)
Handleraccept in interface Handleraccept in interface java.util.function.BiConsumer<ServerRequest,ServerResponse>req - an HTTP server request.res - an HTTP server response.Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.