private static class AsyncRestTemplate.AsyncRequestCallbackAdapter extends java.lang.Object implements AsyncRequestCallback
RequestCallback to the AsyncRequestCallback interface.| Modifier and Type | Field and Description |
|---|---|
private RequestCallback |
adaptee |
| Constructor and Description |
|---|
AsyncRequestCallbackAdapter(RequestCallback requestCallback)
Create a new
AsyncRequestCallbackAdapter from the given
RequestCallback. |
| Modifier and Type | Method and Description |
|---|---|
void |
doWithRequest(AsyncClientHttpRequest request)
|
private final RequestCallback adaptee
public AsyncRequestCallbackAdapter(RequestCallback requestCallback)
AsyncRequestCallbackAdapter from the given
RequestCallback.requestCallback - the callback to base this adapter onpublic void doWithRequest(AsyncClientHttpRequest request) throws java.io.IOException
AsyncRequestCallbackAsyncRestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.AsyncRequestCallback, org.springframework.web.client.ResponseExtractor<T>, java.lang.Object...) with an opened ClientHttpRequest.
Does not need to care about closing the request or about handling errors:
this will all be handled by the RestTemplate.doWithRequest in interface AsyncRequestCallbackrequest - the active HTTP requestjava.io.IOException - in case of I/O errors