Class AsyncHttpAccessor
- java.lang.Object
- org.springframework.http.client.support.AsyncHttpAccessor
- Direct Known Subclasses:
InterceptingAsyncHttpAccessor
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.- Since:
- 4.0
- Author:
- Arjen Poutsma
- See Also:
AsyncRestTemplate
Constructor Summary
Constructors Constructor Description AsyncHttpAccessor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
Constructor Detail
AsyncHttpAccessor
public AsyncHttpAccessor()
Method Detail
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.- Parameters:
url- the URL to connect tomethod- the HTTP method to execute (GET, POST, etc.)- Returns:
- the created request
- Throws:
IOException- in case of I/O errors