Skip to content

Commit c48e929

Browse files
committed
Add a bit more explanatory Javadoc to Interceptor
1 parent cbc78b1 commit c48e929

File tree

1 file changed

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

1 file changed

+12
-2
lines changed

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

Lines changed: 12 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,10 @@ 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,
73+
* HttpResponse, AsyncBody.Consumer)}
6774
*
6875
* @param builder used to modify the request
6976
* @param response the failed response
@@ -75,7 +82,10 @@ default CompletableFuture<Boolean> afterFailure(BasicBuilder builder, HttpRespon
7582

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

0 commit comments

Comments
 (0)