Polishing

(cherry picked from commit 162ee36)
This commit is contained in:
Juergen Hoeller
2015-03-21 00:35:08 +01:00
parent 2de5faf56c
commit 8d14e7736a
14 changed files with 129 additions and 141 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 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.
@@ -43,8 +43,7 @@ import org.springframework.util.Assert;
* @since 4.0
* @see HttpAsyncClient
*/
public class HttpComponentsAsyncClientHttpRequestFactory
extends HttpComponentsClientHttpRequestFactory
public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsClientHttpRequestFactory
implements AsyncClientHttpRequestFactory, InitializingBean {
private CloseableHttpAsyncClient httpAsyncClient;
@@ -86,7 +85,7 @@ public class HttpComponentsAsyncClientHttpRequestFactory
/**
* Set the {@code HttpClient} used for
* {@linkplain #createAsyncRequest(java.net.URI, org.springframework.http.HttpMethod) asynchronous execution}.
* {@linkplain #createAsyncRequest(URI, HttpMethod) asynchronous execution}.
*/
public void setHttpAsyncClient(CloseableHttpAsyncClient httpAsyncClient) {
this.httpAsyncClient = httpAsyncClient;
@@ -97,9 +96,10 @@ public class HttpComponentsAsyncClientHttpRequestFactory
* {@linkplain #createAsyncRequest(URI, HttpMethod) asynchronous execution}.
*/
public CloseableHttpAsyncClient getHttpAsyncClient() {
return httpAsyncClient;
return this.httpAsyncClient;
}
@Override
public void afterPropertiesSet() {
startAsyncClient();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 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.
@@ -19,7 +19,7 @@ package org.springframework.http.converter;
import org.springframework.core.NestedRuntimeException;
/**
* Thrown by {@link HttpMessageConverter} implementations when the conversion fails.
* Thrown by {@link HttpMessageConverter} implementations when a conversion attempt fails.
*
* @author Arjen Poutsma
* @since 3.0
@@ -29,7 +29,6 @@ public class HttpMessageConversionException extends NestedRuntimeException {
/**
* Create a new HttpMessageConversionException.
*
* @param msg the detail message
*/
public HttpMessageConversionException(String msg) {
@@ -38,7 +37,6 @@ public class HttpMessageConversionException extends NestedRuntimeException {
/**
* Create a new HttpMessageConversionException.
*
* @param msg the detail message
* @param cause the root cause (if any)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 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.
@@ -18,7 +18,7 @@ package org.springframework.http.converter;
/**
* Thrown by {@link HttpMessageConverter} implementations when the
* {@link HttpMessageConverter#read(Class, org.springframework.http.HttpInputMessage) read} method fails.
* {@link HttpMessageConverter#read} method fails.
*
* @author Arjen Poutsma
* @since 3.0
@@ -28,7 +28,6 @@ public class HttpMessageNotReadableException extends HttpMessageConversionExcept
/**
* Create a new HttpMessageNotReadableException.
*
* @param msg the detail message
*/
public HttpMessageNotReadableException(String msg) {
@@ -37,11 +36,11 @@ public class HttpMessageNotReadableException extends HttpMessageConversionExcept
/**
* Create a new HttpMessageNotReadableException.
*
* @param msg the detail message
* @param cause the root cause (if any)
*/
public HttpMessageNotReadableException(String msg, Throwable cause) {
super(msg, cause);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 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.
@@ -17,9 +17,8 @@
package org.springframework.http.converter;
/**
* Thrown by {@link org.springframework.http.converter.HttpMessageConverter} implementations when the
* {@link org.springframework.http.converter.HttpMessageConverter#write(Object, org.springframework.http.MediaType,
* org.springframework.http.HttpOutputMessage) write} method fails.
* Thrown by {@link HttpMessageConverter} implementations when the
* {@link HttpMessageConverter#write} method fails.
*
* @author Arjen Poutsma
* @since 3.0
@@ -29,7 +28,6 @@ public class HttpMessageNotWritableException extends HttpMessageConversionExcept
/**
* Create a new HttpMessageNotWritableException.
*
* @param msg the detail message
*/
public HttpMessageNotWritableException(String msg) {
@@ -38,11 +36,11 @@ public class HttpMessageNotWritableException extends HttpMessageConversionExcept
/**
* Create a new HttpMessageNotWritableException.
*
* @param msg the detail message
* @param cause the root cause (if any)
*/
public HttpMessageNotWritableException(String msg, Throwable cause) {
super(msg, cause);
}
}