Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,12 +73,11 @@ abstract class AbstractAsyncClientHttpRequest implements AsyncClientHttpRequest
|
||||
protected abstract OutputStream getBodyInternal(HttpHeaders headers) throws IOException;
|
||||
|
||||
/**
|
||||
* Abstract template method that writes the given headers and content to the HTTP
|
||||
* request.
|
||||
* Abstract template method that writes the given headers and content to the HTTP request.
|
||||
* @param headers the HTTP headers
|
||||
* @return the response object for the executed request
|
||||
*/
|
||||
protected abstract ListenableFuture<ClientHttpResponse> executeInternal(
|
||||
HttpHeaders headers) throws IOException;
|
||||
protected abstract ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers)
|
||||
throws IOException;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,8 +34,8 @@ public class HttpClientErrorException extends HttpStatusCodeException {
|
||||
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on an
|
||||
* {@link HttpStatus}.
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on
|
||||
* an {@link HttpStatus}.
|
||||
* @param statusCode the status code
|
||||
*/
|
||||
public HttpClientErrorException(HttpStatus statusCode) {
|
||||
@@ -43,8 +43,8 @@ public class HttpClientErrorException extends HttpStatusCodeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on an
|
||||
* {@link HttpStatus} and status text.
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on
|
||||
* an {@link HttpStatus} and status text.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
*/
|
||||
@@ -53,30 +53,32 @@ public class HttpClientErrorException extends HttpStatusCodeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on an
|
||||
* {@link HttpStatus}, status text, and response body content.
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on
|
||||
* an {@link HttpStatus}, status text, and response body content.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
* @param responseBody the response body content, may be {@code null}
|
||||
* @param responseCharset the response body charset, may be {@code null}
|
||||
* @param responseBody the response body content (may be {@code null})
|
||||
* @param responseCharset the response body charset (may be {@code null})
|
||||
*/
|
||||
public HttpClientErrorException(HttpStatus statusCode, String statusText,
|
||||
byte[] responseBody, Charset responseCharset) {
|
||||
|
||||
super(statusCode, statusText, responseBody, responseCharset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on an
|
||||
* {@link HttpStatus}, status text, and response body content.
|
||||
* Construct a new instance of {@code HttpClientErrorException} based on
|
||||
* an {@link HttpStatus}, status text, and response body content.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
* @param responseHeaders the response headers, may be {@code null}
|
||||
* @param responseBody the response body content, may be {@code null}
|
||||
* @param responseCharset the response body charset, may be {@code null}
|
||||
* @param responseHeaders the response headers (may be {@code null})
|
||||
* @param responseBody the response body content (may be {@code null})
|
||||
* @param responseCharset the response body charset (may be {@code null})
|
||||
* @since 3.1.2
|
||||
*/
|
||||
public HttpClientErrorException(HttpStatus statusCode, String statusText,
|
||||
HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) {
|
||||
|
||||
super(statusCode, statusText, responseHeaders, responseBody, responseCharset);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,8 +25,8 @@ import org.springframework.http.HttpStatus;
|
||||
* Exception thrown when an HTTP 5xx is received.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see DefaultResponseErrorHandler
|
||||
* @since 3.0
|
||||
* @see DefaultResponseErrorHandler
|
||||
*/
|
||||
public class HttpServerErrorException extends HttpStatusCodeException {
|
||||
|
||||
@@ -34,8 +34,8 @@ public class HttpServerErrorException extends HttpStatusCodeException {
|
||||
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on an
|
||||
* {@link HttpStatus}.
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on
|
||||
* an {@link HttpStatus}.
|
||||
* @param statusCode the status code
|
||||
*/
|
||||
public HttpServerErrorException(HttpStatus statusCode) {
|
||||
@@ -43,8 +43,8 @@ public class HttpServerErrorException extends HttpStatusCodeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on an
|
||||
* {@link HttpStatus} and status text.
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on
|
||||
* an {@link HttpStatus} and status text.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
*/
|
||||
@@ -53,31 +53,34 @@ public class HttpServerErrorException extends HttpStatusCodeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on an
|
||||
* {@link HttpStatus}, status text, and response body content.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
* @param responseBody the response body content, may be {@code null}
|
||||
* @param responseCharset the response body charset, may be {@code null}
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on
|
||||
* an {@link HttpStatus}, status text, and response body content.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
* @param responseBody the response body content (may be {@code null})
|
||||
* @param responseCharset the response body charset (may be {@code null})
|
||||
* @since 3.0.5
|
||||
*/
|
||||
public HttpServerErrorException(HttpStatus statusCode, String statusText,
|
||||
byte[] responseBody, Charset responseCharset) {
|
||||
|
||||
super(statusCode, statusText, responseBody, responseCharset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on a
|
||||
* {@link HttpStatus}, status text, and response body content.
|
||||
* Construct a new instance of {@code HttpServerErrorException} based on
|
||||
* an {@link HttpStatus}, status text, and response body content.
|
||||
* @param statusCode the status code
|
||||
* @param statusText the status text
|
||||
* @param responseHeaders the response headers, may be {@code null}
|
||||
* @param responseBody the response body content, may be {@code null}
|
||||
* @param responseCharset the response body charset, may be {@code null}
|
||||
* @param responseHeaders the response headers (may be {@code null})
|
||||
* @param responseBody the response body content (may be {@code null})
|
||||
* @param responseCharset the response body charset (may be {@code null})
|
||||
* @since 3.1.2
|
||||
*/
|
||||
public HttpServerErrorException(HttpStatus statusCode, String statusText,
|
||||
HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) {
|
||||
|
||||
super(statusCode, statusText, responseHeaders, responseBody, responseCharset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user