public static interface Client.ClientCallback
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Throwable t)
Callback method invoked when the request fails for any reason.
|
void |
complete()
Called when the request completes successfully.
|
Client.ContentCallback |
headers(ResponseHeaders responseHeaders)
Callback method invoked when the HTTP response code and headers are available.
|
Client.ContentCallback headers(ResponseHeaders responseHeaders)
This method can only be invoked once per request.
This method will return a callback which can be used to stream the response content, if any.
Once the response content has been exhausted, complete() should be called to indicate as such.
Note that should should be invoked before complete(), but need not be invoked before
abort(Throwable)
responseHeaders - The response headersvoid abort(Throwable t)
No other methods should be invoked on the callback after this is called (i.e. this is a terminal operation)
t - The exception which caused the request to failvoid complete()
No other methods should be invoked on the callback after this is called (i.e. this is a terminal operation)
Copyright © 2018. All rights reserved.