Interface OciNettyClientFilter<R>
- Type Parameters:
R
- context object that will be passed from beforeRequest to afterResponse.
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Implementing Classes:
SdkMetricsNettyClientFilter
@Indexed(OciNettyClientFilter.class)
public interface OciNettyClientFilter<R>
extends io.micronaut.core.order.Ordered
OciNettyClientFilter interface allows invoking beforeRequest method before OCI SDK client sends a request and afterResponse invokes after request is sent and response is received from the server.
- Since:
- 4.2.0
- Author:
- Nemanja Mikic
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescription@Nullable com.oracle.bmc.http.client.HttpResponse
afterResponse
(@NonNull com.oracle.bmc.http.client.HttpRequest request, @Nullable com.oracle.bmc.http.client.HttpResponse response, @Nullable Throwable throwable, R context) The OCI SDK client will execute this method after it receives the response or exception is thrown.beforeRequest
(@NonNull com.oracle.bmc.http.client.HttpRequest request) The OCI SDK client will execute this method before sending request.Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Method Details
-
beforeRequest
The OCI SDK client will execute this method before sending request.- Parameters:
request
- the http requests.- Returns:
- the data that will be passed to
afterResponse(HttpRequest, HttpResponse, Throwable, Object)
-
afterResponse
@Nullable @Nullable com.oracle.bmc.http.client.HttpResponse afterResponse(@NonNull @NonNull com.oracle.bmc.http.client.HttpRequest request, @Nullable @Nullable com.oracle.bmc.http.client.HttpResponse response, @Nullable @Nullable Throwable throwable, @NonNull R context) The OCI SDK client will execute this method after it receives the response or exception is thrown.- Parameters:
request
- the http requests.response
- the http response.throwable
- the exception that has been thrown during sending request and receiving response.context
- the data passed frombeforeRequest(HttpRequest)
- Returns:
- the http response
-