Module org.refcodes.web
Package org.refcodes.web
Interface HttpInterceptable<I extends HttpInterceptor<?,?>>
- Type Parameters:
I- The type ofHttpInterceptorto be managed.
- All Superinterfaces:
PostHttpInterceptable<I>,PreHttpInterceptable<I>
public interface HttpInterceptable<I extends HttpInterceptor<?,?>>
extends PreHttpInterceptable<I>, PostHttpInterceptable<I>
The
HttpInterceptable provides base functionality for working with
HttpInterceptor instances using the PreHttpInterceptable as
well as the PostHttpInterceptable definitions.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanaddHttpInterceptor(I aInterceptor) Adds the givenHttpInterceptorinstance.default booleanhasHttpInterceptor(I aInterceptor) Tests whether the givenHttpInterceptorinstance has been added.default booleanremoveHttpInterceptor(I aInterceptor) Removes theHttpInterceptorinstance.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 givenHttpInterceptorinstance has been added.- Parameters:
aInterceptor- TheHttpInterceptorinstance for which to test if it has been added.- Returns:
- True in case
PreHttpInterceptable.hasPreHttpInterceptor(PreHttpInterceptor)as wellPostHttpInterceptable.hasPostHttpInterceptor(PostHttpInterceptor)return true,
-
addHttpInterceptor
Adds the givenHttpInterceptorinstance. TheHttpInterceptorinstance itself acts as the handle which is used when removing the givenHttpInterceptorinstance later.- Parameters:
aInterceptor- TheHttpInterceptorinstance which is to be added.- Returns:
- True in case
PreHttpInterceptable.addPreHttpInterceptor(PreHttpInterceptor)orPostHttpInterceptable.addPostHttpInterceptor(PostHttpInterceptor)return true.
-
removeHttpInterceptor
Removes theHttpInterceptorinstance. In case theHttpInterceptorinstance has not been added before, then false is returned.- Parameters:
aInterceptor- TheHttpInterceptorinstance which is to be removed.- Returns:
- True in case
PreHttpInterceptable.removePreHttpInterceptor(PreHttpInterceptor)orPostHttpInterceptable.removePostHttpInterceptor(PostHttpInterceptor)return true.
-