Class HttpLoggingInterceptor
- java.lang.Object
-
- io.fabric8.kubernetes.client.http.HttpLoggingInterceptor
-
- All Implemented Interfaces:
Interceptor
public class HttpLoggingInterceptor extends Object implements Interceptor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.http.Interceptor
Interceptor.RequestTags
-
-
Constructor Summary
Constructors Constructor Description HttpLoggingInterceptor()
HttpLoggingInterceptor(org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
after(HttpRequest request, HttpResponse<?> response, AsyncBody.Consumer<List<ByteBuffer>> consumer)
Called after a non-WebSocket HTTP response is received.AsyncBody.Consumer<List<ByteBuffer>>
consumer(AsyncBody.Consumer<List<ByteBuffer>> consumer, HttpRequest request)
Called before a request to allow the encapsulation of the provided consumer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.http.Interceptor
afterConnectionFailure, afterFailure, afterFailure, before
-
-
-
-
Method Detail
-
consumer
public AsyncBody.Consumer<List<ByteBuffer>> consumer(AsyncBody.Consumer<List<ByteBuffer>> consumer, HttpRequest request)
Description copied from interface:Interceptor
Called before a request to allow the encapsulation of the provided consumer.- Specified by:
consumer
in interfaceInterceptor
- Parameters:
consumer
- the original consumer.request
- the HTTP request.- Returns:
- the consumer to use.
-
after
public void after(HttpRequest request, HttpResponse<?> response, AsyncBody.Consumer<List<ByteBuffer>> consumer)
Description copied from interface:Interceptor
Called after a non-WebSocket HTTP response is received. The body might or might not be already consumed.Should be used to analyze response codes and headers, original response shouldn't be altered.
- Specified by:
after
in interfaceInterceptor
- Parameters:
request
- the original request sent to the server.response
- the response received from the server.
-
-