/** * Returns the {@link HttpResponseStatus} represented by the specified code. * If the specified code is a standard HTTP status code, a cached instance * will be returned. Otherwise, a new instance will be returned. */ public static HttpResponseStatus valueOf(int code) { HttpResponseStatus status = valueOf0(code); return status != null ? status : new HttpResponseStatus(code); }
/** * Returns the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. * If the specified code is a standard HTTP status {@code code} and {@code reasonPhrase}, a cached instance * will be returned. Otherwise, a new instance will be returned. * @param code The response code value. * @param reasonPhrase The response code reason phrase. * @return the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. */ public static HttpResponseStatus valueOf(int code, String reasonPhrase) { HttpResponseStatus responseStatus = valueOf0(code); return responseStatus != null && responseStatus.reasonPhrase().contentEquals(reasonPhrase) ? responseStatus : new HttpResponseStatus(code, reasonPhrase); }
/** * Returns the {@link HttpResponseStatus} represented by the specified code. * If the specified code is a standard HTTP status code, a cached instance * will be returned. Otherwise, a new instance will be returned. */ public static HttpResponseStatus valueOf(int code) { HttpResponseStatus status = valueOf0(code); return status != null ? status : new HttpResponseStatus(code); }
/** * Returns the {@link HttpResponseStatus} represented by the specified code. * If the specified code is a standard HTTP status code, a cached instance * will be returned. Otherwise, a new instance will be returned. */ public static HttpResponseStatus valueOf(int code) { HttpResponseStatus status = valueOf0(code); return status != null ? status : new HttpResponseStatus(code); }
/** * Returns the {@link HttpResponseStatus} represented by the specified code. * If the specified code is a standard HTTP status code, a cached instance * will be returned. Otherwise, a new instance will be returned. */ public static HttpResponseStatus valueOf(int code) { HttpResponseStatus status = valueOf0(code); return status != null ? status : new HttpResponseStatus(code); }
/** * Returns the {@link HttpResponseStatus} represented by the specified code. * If the specified code is a standard HTTP status code, a cached instance * will be returned. Otherwise, a new instance will be returned. */ public static HttpResponseStatus valueOf(int code) { HttpResponseStatus status = valueOf0(code); return status != null ? status : new HttpResponseStatus(code); }
/** * Returns the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. * If the specified code is a standard HTTP status {@code code} and {@code reasonPhrase}, a cached instance * will be returned. Otherwise, a new instance will be returned. * @param code The response code value. * @param reasonPhrase The response code reason phrase. * @return the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. */ public static HttpResponseStatus valueOf(int code, String reasonPhrase) { HttpResponseStatus responseStatus = valueOf0(code); return responseStatus != null && responseStatus.reasonPhrase().contentEquals(reasonPhrase) ? responseStatus : new HttpResponseStatus(code, reasonPhrase); }
/** * Returns the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. * If the specified code is a standard HTTP status {@code code} and {@code reasonPhrase}, a cached instance * will be returned. Otherwise, a new instance will be returned. * @param code The response code value. * @param reasonPhrase The response code reason phrase. * @return the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. */ public static HttpResponseStatus valueOf(int code, String reasonPhrase) { HttpResponseStatus responseStatus = valueOf0(code); return responseStatus != null && responseStatus.reasonPhrase().contentEquals(reasonPhrase) ? responseStatus : new HttpResponseStatus(code, reasonPhrase); }
/** * Returns the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. * If the specified code is a standard HTTP status {@code code} and {@code reasonPhrase}, a cached instance * will be returned. Otherwise, a new instance will be returned. * @param code The response code value. * @param reasonPhrase The response code reason phrase. * @return the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. */ public static HttpResponseStatus valueOf(int code, String reasonPhrase) { HttpResponseStatus responseStatus = valueOf0(code); return responseStatus != null && responseStatus.reasonPhrase().contentEquals(reasonPhrase) ? responseStatus : new HttpResponseStatus(code, reasonPhrase); }
/** * Returns the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. * If the specified code is a standard HTTP status {@code code} and {@code reasonPhrase}, a cached instance * will be returned. Otherwise, a new instance will be returned. * @param code The response code value. * @param reasonPhrase The response code reason phrase. * @return the {@link HttpResponseStatus} represented by the specified {@code code} and {@code reasonPhrase}. */ public static HttpResponseStatus valueOf(int code, String reasonPhrase) { HttpResponseStatus responseStatus = valueOf0(code); return responseStatus != null && responseStatus.reasonPhrase().contentEquals(reasonPhrase) ? responseStatus : new HttpResponseStatus(code, reasonPhrase); }