- All Superinterfaces:
PostHttpClientInterceptable,PostHttpInterceptable<PostHttpClientInterceptor>,PreHttpClientInterceptable,PreHttpInterceptable<PreHttpClientInterceptor>
public interface HttpClientInterceptable
extends PreHttpClientInterceptable, PostHttpClientInterceptable
The
HttpClientInterceptable provides base functionality for working
with HttpClientInterceptor instances using the
PreHttpClientInterceptable as well as the
PostHttpClientInterceptable definitions.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanaddHttpInterceptor(HttpClientInterceptor aInterceptor) Adds the givenHttpClientInterceptorinstance.default booleanhasHttpInterceptor(HttpClientInterceptor aInterceptor) Tests whether the givenHttpClientInterceptorinstance has been added.default booleanremoveHttpInterceptor(HttpClientInterceptor aInterceptor) Removes theHttpClientInterceptorinstance.Methods inherited from interface org.refcodes.web.PostHttpInterceptable
addPostHttpInterceptor, hasPostHttpInterceptor, removePostHttpInterceptorMethods inherited from interface org.refcodes.web.PreHttpInterceptable
addPreHttpInterceptor, hasPreHttpInterceptor, removePreHttpInterceptor
-
Method Details
-
hasHttpInterceptor
Tests whether the givenHttpClientInterceptorinstance has been added.- Parameters:
aInterceptor- TheHttpClientInterceptorinstance for which to test if it has been added.- Returns:
- True in case
PreHttpInterceptable.hasPreHttpInterceptor(PreHttpInterceptor)as well asPostHttpInterceptable.hasPostHttpInterceptor(PostHttpInterceptor)return true.
-
addHttpInterceptor
Adds the givenHttpClientInterceptorinstance. TheHttpClientInterceptorinstance itself acts as the handle which is used when removing the givenHttpClientInterceptorinstance later.- Parameters:
aInterceptor- TheHttpClientInterceptorinstance which is to be added.- Returns:
- True in case
PreHttpInterceptable.addPreHttpInterceptor(PreHttpInterceptor)orPostHttpInterceptable.addPostHttpInterceptor(PostHttpInterceptor)return true.
-
removeHttpInterceptor
Removes theHttpClientInterceptorinstance. In case theHttpClientInterceptorinstance has not been added before, then false is returned.- Parameters:
aInterceptor- TheHttpClientInterceptorinstance which is to be removed.- Returns:
- True in case
PreHttpInterceptable.removePreHttpInterceptor(PreHttpInterceptor)orPostHttpInterceptable.removePostHttpInterceptor(PostHttpInterceptor)return true.
-