Class KubFlyClientInterceptor
java.lang.Object
io.kubfly.sdk.spring.KubFlyClientInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public final class KubFlyClientInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
The frame of every outgoing request of
RestClient and RestTemplate: the scope
sdk/spring-boot/http/rest-client/request with the tags method, host and uri (the
path, without the query), under the frame of the caller — the request to another service is a branch of the call
tree, and the headers of the frame let that service continue it (Trace). Then the metrics of its route
(ClientRoutes): the status of the response, or errors when none came. The frame lasts until the
response comes; its body is read by the caller.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) Runs the request in its frame and measures its route.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.client.ClientHttpRequestInterceptor
andThen, apply
-
Constructor Details
-
KubFlyClientInterceptor
public KubFlyClientInterceptor()An interceptor.
-
-
Method Details
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException Runs the request in its frame and measures its route.- Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Parameters:
request- the requestbody- the bodyexecution- the rest of the chain- Returns:
- the response
- Throws:
IOException- as the chain throws it
-