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 |
|---|---|
default void |
onResponseCancel()
Callback when the response is cancelled.
|
default void |
onResponseComplete()
Callback when the response completes successfully.
|
default void |
onResponseData(Buffer data)
Callback when the response payload body data chunk was observed.
|
default void |
onResponseDataRequested(long n)
Callback when subscriber requests
n items of the response payload body. |
default void |
onResponseError(Throwable cause)
Callback when the response fails with an error.
|
default void |
onResponseTrailers(HttpHeaders trailers)
Callback when response trailers were observed.
|
default void onResponseDataRequested(long n)
n items of the response payload body.
May be invoked multiple times. Helps to track when items are requested and when they are
delivered.
n - number of requested itemsdefault void onResponseData(Buffer data)
May be invoked multiple times if the payload body is split into multiple chunks.
data - the response payload body data chunkdefault void onResponseTrailers(HttpHeaders trailers)
trailers - trailers of the responsedefault void onResponseComplete()
This is one of the possible terminal events.
default void onResponseError(Throwable cause)
This is one of the possible terminal events.
cause - Throwable that terminated this responsedefault void onResponseCancel()
This is one of the possible terminal events. Cancellation is the best effort, more events may be signaled after cancel.