public static interface HttpLifecycleObserver.HttpResponseObserver
The response is considered complete when one of the terminal events is invoked. It's guaranteed only one terminal event will be invoked per response.
| Modifier and Type | Method and Description |
|---|---|
void |
onResponseCancel()
Callback when the response is cancelled.
|
void |
onResponseComplete()
Callback when the response completes successfully.
|
void |
onResponseData(Buffer data)
Callback when the response payload body data chunk was observed.
|
void |
onResponseError(Throwable cause)
Callback when the response fails with an error.
|
void |
onResponseTrailers(HttpHeaders trailers)
Callback when response trailers were observed.
|
void onResponseData(Buffer data)
May be invoked multiple times if the payload body is split into multiple chunks.
data - the response payload body data chunkvoid onResponseTrailers(HttpHeaders trailers)
trailers - trailers of the responsevoid onResponseComplete()
This is one of the possible terminal events.
void onResponseError(Throwable cause)
This is one of the possible terminal events.
cause - Throwable that terminated this responsevoid onResponseCancel()
This is one of the possible terminal events. Cancellation is the best effort, more events may be signaled after cancel.