All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR1
Show newest version
/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.vertx.rxjava.ext.web.client.predicate;

import rx.Observable;
import rx.Single;
import io.vertx.rx.java.RxHelper;
import io.vertx.rx.java.WriteStreamSubscriber;
import io.vertx.rx.java.SingleOnSubscribeAdapter;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;

/**
 * A predicate on .
 * 

* By default, a Vert.x Web Client request ends with an error only if something wrong happens at the network level. * In other words, a 404 Not Found response, or a response with the wrong content type, are NOT considered as failures. *

* {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate Response predicates} can fail a request when the response does not match some criteria. *

* Custom predicate instances can be used with . *

* As a convenience, a few predicates for common uses cases are predefined. For example: *

    *
  • {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate} to verify that the response has a 2xx code, or
  • *
  • {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate} to verify that the response body contains JSON data.
  • *
  • ...
  • *
* Predefined predicates use the default error converter (discarding the body). *

* However, you can create a new {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate} instance from an existing one using {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate#create} or * {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate#create} when the body is required to build the validation failure. * *

* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.client.predicate.ResponsePredicate original} non RX-ified interface using Vert.x codegen. */ @RxGen(io.vertx.ext.web.client.predicate.ResponsePredicate.class) public class ResponsePredicate implements Function, io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult> { @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ResponsePredicate that = (ResponsePredicate) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } @Override public io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.rxjava.ext.web.client.HttpResponse in) { io.vertx.ext.web.client.predicate.ResponsePredicateResult ret; ret = getDelegate().apply(in.getDelegate()); Function outConv = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult::newInstance; return outConv.apply(ret); } public static final TypeArg __TYPE_ARG = new TypeArg<>( obj -> new ResponsePredicate((io.vertx.ext.web.client.predicate.ResponsePredicate) obj), ResponsePredicate::getDelegate ); private final io.vertx.ext.web.client.predicate.ResponsePredicate delegate; public ResponsePredicate(io.vertx.ext.web.client.predicate.ResponsePredicate delegate) { this.delegate = delegate; } public ResponsePredicate(Object delegate) { this.delegate = (io.vertx.ext.web.client.predicate.ResponsePredicate)delegate; } public io.vertx.ext.web.client.predicate.ResponsePredicate getDelegate() { return delegate; } /** * Creates a predicate asserting that the status response code is equal to statusCode. * @param statusCode the expected status code * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate status(int statusCode) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.status(statusCode)); return ret; } /** * Creates a predicate asserting that the status response code is in the [min,max[ range. * @param min the lower (inclusive) accepted status code * @param max the highest (exclusive) accepted status code * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate status(int min, int max) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.status(min, max)); return ret; } /** * Creates a predicate validating the response has a content-type header matching the mimeType. * @param mimeType the mime type * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate contentType(String mimeType) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.contentType(mimeType)); return ret; } /** * Creates a predicate validating the response has a content-type header matching one of the mimeTypes. * @param mimeTypes the list of mime types * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate contentType(List mimeTypes) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.contentType(mimeTypes)); return ret; } /** * Creates a new {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate}. The default error converter will be used (discarding the body). * @param test the function to invoke when the response is received * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate create(Function, io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult> test) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.create(new Function,io.vertx.ext.web.client.predicate.ResponsePredicateResult>() { public io.vertx.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.ext.web.client.HttpResponse arg) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult ret = test.apply(io.vertx.rxjava.ext.web.client.HttpResponse.newInstance((io.vertx.ext.web.client.HttpResponse)arg, TypeArg.unknown())); return ret.getDelegate(); } })); return ret; } /** * Creates a new {@link io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate}, using a custom errorConverter. * @param test the function to invoke when the response is received * @param errorConverter converts the result of the test function to a {@link java.lang.Throwable} * @return */ public static io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate create(Function, io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult> test, io.vertx.rxjava.ext.web.client.predicate.ErrorConverter errorConverter) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate ret = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.create(new Function,io.vertx.ext.web.client.predicate.ResponsePredicateResult>() { public io.vertx.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.ext.web.client.HttpResponse arg) { io.vertx.rxjava.ext.web.client.predicate.ResponsePredicateResult ret = test.apply(io.vertx.rxjava.ext.web.client.HttpResponse.newInstance((io.vertx.ext.web.client.HttpResponse)arg, TypeArg.unknown())); return ret.getDelegate(); } }, errorConverter.getDelegate())); return ret; } /** * @return the error converter currently used */ public io.vertx.rxjava.ext.web.client.predicate.ErrorConverter errorConverter() { io.vertx.rxjava.ext.web.client.predicate.ErrorConverter ret = io.vertx.rxjava.ext.web.client.predicate.ErrorConverter.newInstance((io.vertx.ext.web.client.predicate.ErrorConverter)delegate.errorConverter()); return ret; } /** * Any 1XX informational response */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_INFORMATIONAL_RESPONSE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INFORMATIONAL_RESPONSE); /** * 100 Continue */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_CONTINUE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CONTINUE); /** * 101 Switching Protocols */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_SWITCHING_PROTOCOLS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SWITCHING_PROTOCOLS); /** * 102 Processing (WebDAV, RFC2518) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PROCESSING = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PROCESSING); /** * 103 Early Hints */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_EARLY_HINTS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_EARLY_HINTS); /** * Any 2XX success */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_SUCCESS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SUCCESS); /** * 200 OK */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_OK = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_OK); /** * 201 Created */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_CREATED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CREATED); /** * 202 Accepted */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_ACCEPTED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_ACCEPTED); /** * 203 Non-Authoritative Information (since HTTP/1.1) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NON_AUTHORITATIVE_INFORMATION = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NON_AUTHORITATIVE_INFORMATION); /** * 204 No Content */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NO_CONTENT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NO_CONTENT); /** * 205 Reset Content */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_RESET_CONTENT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_RESET_CONTENT); /** * 206 Partial Content */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PARTIAL_CONTENT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PARTIAL_CONTENT); /** * 207 Multi-Status (WebDAV, RFC2518) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_MULTI_STATUS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MULTI_STATUS); /** * Any 3XX redirection */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REDIRECTION = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REDIRECTION); /** * 300 Multiple Choices */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_MULTIPLE_CHOICES = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MULTIPLE_CHOICES); /** * 301 Moved Permanently */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_MOVED_PERMANENTLY = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MOVED_PERMANENTLY); /** * 302 Found */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_FOUND = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FOUND); /** * 303 See Other (since HTTP/1.1) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_SEE_OTHER = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SEE_OTHER); /** * 304 Not Modified */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NOT_MODIFIED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_MODIFIED); /** * 305 Use Proxy (since HTTP/1.1) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_USE_PROXY = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_USE_PROXY); /** * 307 Temporary Redirect (since HTTP/1.1) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_TEMPORARY_REDIRECT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_TEMPORARY_REDIRECT); /** * 308 Permanent Redirect (RFC7538) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PERMANENT_REDIRECT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PERMANENT_REDIRECT); /** * Any 4XX client error */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_CLIENT_ERRORS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CLIENT_ERRORS); /** * 400 Bad Request */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_BAD_REQUEST = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_BAD_REQUEST); /** * 401 Unauthorized */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_UNAUTHORIZED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNAUTHORIZED); /** * 402 Payment Required */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PAYMENT_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PAYMENT_REQUIRED); /** * 403 Forbidden */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_FORBIDDEN = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FORBIDDEN); /** * 404 Not Found */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NOT_FOUND = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_FOUND); /** * 405 Method Not Allowed */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_METHOD_NOT_ALLOWED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_METHOD_NOT_ALLOWED); /** * 406 Not Acceptable */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NOT_ACCEPTABLE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_ACCEPTABLE); /** * 407 Proxy Authentication Required */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PROXY_AUTHENTICATION_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PROXY_AUTHENTICATION_REQUIRED); /** * 408 Request Timeout */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REQUEST_TIMEOUT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_TIMEOUT); /** * 409 Conflict */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_CONFLICT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CONFLICT); /** * 410 Gone */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_GONE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_GONE); /** * 411 Length Required */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_LENGTH_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_LENGTH_REQUIRED); /** * 412 Precondition Failed */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PRECONDITION_FAILED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PRECONDITION_FAILED); /** * 413 Request Entity Too Large */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REQUEST_ENTITY_TOO_LARGE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_ENTITY_TOO_LARGE); /** * 414 Request-URI Too Long */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REQUEST_URI_TOO_LONG = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_URI_TOO_LONG); /** * 415 Unsupported Media Type */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_UNSUPPORTED_MEDIA_TYPE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNSUPPORTED_MEDIA_TYPE); /** * 416 Requested Range Not Satisfiable */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REQUESTED_RANGE_NOT_SATISFIABLE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUESTED_RANGE_NOT_SATISFIABLE); /** * 417 Expectation Failed */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_EXPECTATION_FAILED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_EXPECTATION_FAILED); /** * 421 Misdirected Request */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_MISDIRECTED_REQUEST = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MISDIRECTED_REQUEST); /** * 422 Unprocessable Entity (WebDAV, RFC4918) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_UNPROCESSABLE_ENTITY = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNPROCESSABLE_ENTITY); /** * 423 Locked (WebDAV, RFC4918) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_LOCKED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_LOCKED); /** * 424 Failed Dependency (WebDAV, RFC4918) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_FAILED_DEPENDENCY = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FAILED_DEPENDENCY); /** * 425 Unordered Collection (WebDAV, RFC3648) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_UNORDERED_COLLECTION = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNORDERED_COLLECTION); /** * 426 Upgrade Required (RFC2817) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_UPGRADE_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UPGRADE_REQUIRED); /** * 428 Precondition Required (RFC6585) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_PRECONDITION_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PRECONDITION_REQUIRED); /** * 429 Too Many Requests (RFC6585) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_TOO_MANY_REQUESTS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_TOO_MANY_REQUESTS); /** * 431 Request Header Fields Too Large (RFC6585) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_REQUEST_HEADER_FIELDS_TOO_LARGE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_HEADER_FIELDS_TOO_LARGE); /** * Any 5XX server error */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_SERVER_ERRORS = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SERVER_ERRORS); /** * 500 Internal Server Error */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_INTERNAL_SERVER_ERROR = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INTERNAL_SERVER_ERROR); /** * 501 Not Implemented */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NOT_IMPLEMENTED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_IMPLEMENTED); /** * 502 Bad Gateway */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_BAD_GATEWAY = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_BAD_GATEWAY); /** * 503 Service Unavailable */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_SERVICE_UNAVAILABLE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SERVICE_UNAVAILABLE); /** * 504 Gateway Timeout */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_GATEWAY_TIMEOUT = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_GATEWAY_TIMEOUT); /** * 505 HTTP Version Not Supported */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_HTTP_VERSION_NOT_SUPPORTED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_HTTP_VERSION_NOT_SUPPORTED); /** * 506 Variant Also Negotiates (RFC2295) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_VARIANT_ALSO_NEGOTIATES = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_VARIANT_ALSO_NEGOTIATES); /** * 507 Insufficient Storage (WebDAV, RFC4918) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_INSUFFICIENT_STORAGE = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INSUFFICIENT_STORAGE); /** * 510 Not Extended (RFC2774) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NOT_EXTENDED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_EXTENDED); /** * 511 Network Authentication Required (RFC6585) */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate SC_NETWORK_AUTHENTICATION_REQUIRED = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NETWORK_AUTHENTICATION_REQUIRED); /** * Creates a predicate validating the response content-type is application/json. */ public static final io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate JSON = io.vertx.rxjava.ext.web.client.predicate.ResponsePredicate.newInstance((io.vertx.ext.web.client.predicate.ResponsePredicate)io.vertx.ext.web.client.predicate.ResponsePredicate.JSON); public static ResponsePredicate newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate arg) { return arg != null ? new ResponsePredicate(arg) : null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy