Browse Source

Update javadoc for (Async)RestTemplate

Issue: SPR-13313
pull/866/head
Rossen Stoyanchev 11 years ago
parent
commit
bdf735125f
  1. 3
      spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java
  2. 5
      spring-web/src/main/java/org/springframework/web/client/AsyncRestTemplate.java
  3. 5
      spring-web/src/main/java/org/springframework/web/client/RestTemplate.java

3
spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java

@ -50,7 +50,8 @@ public abstract class HttpAccessor { @@ -50,7 +50,8 @@ public abstract class HttpAccessor {
/**
* Set the request factory that this accessor uses for obtaining {@link ClientHttpRequest HttpRequests}.
* Set the request factory that this accessor uses for obtaining
* {@link ClientHttpRequest HttpRequests}.
*/
public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
Assert.notNull(requestFactory, "'requestFactory' must not be null");

5
spring-web/src/main/java/org/springframework/web/client/AsyncRestTemplate.java

@ -63,6 +63,11 @@ import org.springframework.web.util.UriTemplateHandler; @@ -63,6 +63,11 @@ import org.springframework.web.util.UriTemplateHandler;
* {@linkplain #setMessageConverters(List) message converters} with this
* {@code RestTemplate}.
*
* <p><strong>Note:</strong> by default {@code AsyncRestTemplate} relies on
* standard JDK facilities to establish HTTP connections. You can switch to use
* a different HTTP library such as Apache HttpComponents, Netty, and OkHttp by
* using a constructor accepting an {@link AsyncClientHttpRequestFactory}.
*
* <p>For more information, please refer to the {@link RestTemplate} API documentation.
*
* @author Arjen Poutsma

5
spring-web/src/main/java/org/springframework/web/client/RestTemplate.java

@ -60,6 +60,11 @@ import org.springframework.web.util.UriTemplateHandler; @@ -60,6 +60,11 @@ import org.springframework.web.util.UriTemplateHandler;
* It handles HTTP connections, leaving application code to provide URLs
* (with possible template variables) and extract results.
*
* <p><strong>Note:</strong> by default the RestTemplate relies on standard JDK
* facilities to establish HTTP connections. You can switch to use a different
* HTTP library such as Apache HttpComponents, Netty, and OkHttp through the
* {@link #setRequestFactory} property.
*
* <p>The main entry points of this template are the methods named after the six main HTTP methods:
* <table>
* <tr><th>HTTP method</th><th>RestTemplate methods</th></tr>

Loading…
Cancel
Save