@Override public HttpHandler wrap(HttpHandler handler) { return new HttpContinueAcceptingHandler(handler, predicate); } }
/** * Returns a handler that sends back a HTTP 100 continue response to all requests. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next) { return new HttpContinueAcceptingHandler(next); }
/** * Returns a handler that sends back a HTTP 100 continue response if the given predicate resolves to true. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @param accept The predicate used to determine if the request should be accepted * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next, final Predicate accept) { return new HttpContinueAcceptingHandler(next, accept); }
/** * Returns a handler that sends back a HTTP 100 continue response if the given predicate resolves to true. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @param accept The predicate used to determine if the request should be accepted * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next, final Predicate accept) { return new HttpContinueAcceptingHandler(next, accept); }
/** * Returns a handler that sends back a HTTP 100 continue response to all requests. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next) { return new HttpContinueAcceptingHandler(next); }
@Override public HttpHandler wrap(HttpHandler handler) { return new HttpContinueAcceptingHandler(handler, predicate); } }
/** * Returns a handler that sends back a HTTP 100 continue response to all requests. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next) { return new HttpContinueAcceptingHandler(next); }
@Override public HttpHandler wrap(HttpHandler handler) { return new HttpContinueAcceptingHandler(handler, predicate); } }
/** * Returns a handler that sends back a HTTP 100 continue response if the given predicate resolves to true. * * This handler differs from the one returned by {@link #httpContinueRead(io.undertow.server.HttpHandler)} in * that it will eagerly send the response, and not wait for the first read attempt. * * @param next The next handler * @param accept The predicate used to determine if the request should be accepted * @return The accepting handler */ public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next, final Predicate accept) { return new HttpContinueAcceptingHandler(next, accept); }
/** * buildGracefulShutdownHandler * * @param paths * @return */ private static GracefulShutdownHandler buildGracefulShutdownHandler(PathHandler paths) { return new GracefulShutdownHandler( new RequestLimitingHandler(new RequestLimit(configuration.getRequestLimit()), new AllowedMethodsHandler( new BlockingHandler( new GzipEncodingHandler( new ErrorHandler( new HttpContinueAcceptingHandler(paths) ), configuration.isForceGzipEncoding() ) ), // allowed methods HttpString.tryFromString(RequestContext.METHOD.GET.name()), HttpString.tryFromString(RequestContext.METHOD.POST.name()), HttpString.tryFromString(RequestContext.METHOD.PUT.name()), HttpString.tryFromString(RequestContext.METHOD.DELETE.name()), HttpString.tryFromString(RequestContext.METHOD.PATCH.name()), HttpString.tryFromString(RequestContext.METHOD.OPTIONS.name()) ) ) ); }