@FunctionalInterface
public interface HttpLifecycleObserver
In order to deliver events at accurate time, callbacks on this interface can be invoked from the IoExecutor.
Implementation of this observer must be non-blocking. If the
consumer of events may block (uses a blocking library or
logger configuration is not async), it has to
offload publications to another Executor after capturing timing of events. If blocking code is
executed inside callbacks without offloading, it will negatively impact IoExecutor.
To install this observer for the server use HttpServerBuilder.lifecycleObserver(HttpLifecycleObserver), for
the client use SingleAddressHttpClientBuilder.appendClientFilter(StreamingHttpClientFilterFactory) with
io.servicetalk.http.netty.HttpLifecycleObserverRequesterFilter.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
HttpLifecycleObserver.HttpExchangeObserver
An observer interface that provides visibility into events associated with a single HTTP exchange.
|
static interface |
HttpLifecycleObserver.HttpRequestObserver
An observer interface that provides visibility into events associated with a single HTTP request.
|
static interface |
HttpLifecycleObserver.HttpResponseObserver
An observer interface that provides visibility into events associated with a single HTTP response.
|
| Modifier and Type | Method and Description |
|---|---|
HttpLifecycleObserver.HttpExchangeObserver |
onNewExchange()
Callback when a new HTTP exchange starts.
|
HttpLifecycleObserver.HttpExchangeObserver onNewExchange()
HttpLifecycleObserver.HttpExchangeObserver that provides visibility into exchange events