Class AsyncHttpAccessor
- java.lang.Object
- org.springframework.http.client.support.AsyncHttpAccessor
- Direct Known Subclasses:
InterceptingAsyncHttpAccessor
public class AsyncHttpAccessor extends Object
Base class forAsyncRestTemplate
and other HTTP accessing gateway helpers, defining common properties such as theAsyncClientHttpRequestFactory
to 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 AsyncClientHttpRequest
createAsyncRequest(URI url, HttpMethod method)
Create a newAsyncClientHttpRequest
via this template'sAsyncClientHttpRequestFactory
.AsyncClientHttpRequestFactory
getAsyncRequestFactory()
Return the request factory that this accessor uses for obtainingHttpRequests
.void
setAsyncRequestFactory(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 newAsyncClientHttpRequest
via 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