类 AsyncHttpAccessor
- java.lang.Object
- org.springframework.http.client.support.AsyncHttpAccessor
public class AsyncHttpAccessor extends Object
Base class forAsyncRestTemplateand other HTTP accessing gateway helpers, defining common properties such as theAsyncClientHttpRequestFactoryto operate on.Not intended to be used directly. See
AsyncRestTemplate.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma
- 另请参阅:
AsyncRestTemplate
构造器概要
构造器 构造器 说明 AsyncHttpAccessor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected AsyncClientHttpRequestcreateAsyncRequest(URI url, HttpMethod method)Create a newAsyncClientHttpRequestvia this template'sAsyncClientHttpRequestFactory.AsyncClientHttpRequestFactorygetAsyncRequestFactory()Return the request factory that this accessor uses for obtainingHttpRequests.voidsetAsyncRequestFactory(AsyncClientHttpRequestFactory asyncRequestFactory)Set the request factory that this accessor uses for obtainingHttpRequests.
构造器详细资料
AsyncHttpAccessor
public AsyncHttpAccessor()
方法详细资料
setAsyncRequestFactory
public void setAsyncRequestFactory(AsyncClientHttpRequestFactory asyncRequestFactory)
Set the request factory that this accessor uses for obtainingHttpRequests.
getAsyncRequestFactory
public AsyncClientHttpRequestFactory getAsyncRequestFactory()
Return the request factory that this accessor uses for obtainingHttpRequests.
createAsyncRequest
protected AsyncClientHttpRequest createAsyncRequest(URI url, HttpMethod method) throws IOException
Create a newAsyncClientHttpRequestvia this template'sAsyncClientHttpRequestFactory.- 参数:
url- the URL to connect tomethod- the HTTP method to execute (GET, POST, etc.)- 返回:
- the created request
- 抛出:
IOException- in case of I/O errors