Skip to content

Commit bb6746c

Browse files
committed
Add a bit more explanatory Javadoc to Interceptor
1 parent 113fa79 commit bb6746c

File tree

1 file changed

+10
-2
lines changed
  • kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/http

1 file changed

+10
-2
lines changed

kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/http/Interceptor.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
import java.util.List;
2020
import java.util.concurrent.CompletableFuture;
2121

22+
/**
23+
* A collection of callback methods invoked through the various stages of the HTTP request lifecycle.
24+
* Callbacks that lead to a request being sent allow for that request to be customised.
25+
*/
2226
public interface Interceptor {
2327

2428
interface RequestTags {
@@ -63,7 +67,9 @@ default AsyncBody.Consumer<List<ByteBuffer>> consumer(AsyncBody.Consumer<List<By
6367
}
6468

6569
/**
66-
* Called after a websocket failure or by default from a normal request
70+
* Called after a websocket failure or by default from a normal request.
71+
* <p>
72+
* Failure is determined by HTTP status code and will be invoked in addition to {@see Interceptor#after(HttpRequest, HttpResponse, AsyncBody.Consumer)}
6773
*
6874
* @param builder used to modify the request
6975
* @param response the failed response
@@ -75,7 +81,9 @@ default CompletableFuture<Boolean> afterFailure(BasicBuilder builder, HttpRespon
7581

7682
/**
7783
* Called after a non-websocket failure
78-
*
84+
* <p>
85+
* Failure is determined by HTTP status code and will be invoked in addition to {@see Interceptor#after(HttpRequest, HttpResponse, AsyncBody.Consumer)}
86+
7987
* @param builder used to modify the request
8088
* @param response the failed response
8189
* @return true if the builder should be used to execute a new request

0 commit comments

Comments
 (0)