Module org.refcodes.web
Package org.refcodes.web
Interface HttpInterceptable<I extends HttpInterceptor<?,?>>
- Type Parameters:
I
- The type ofHttpInterceptor
to 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 boolean
addHttpInterceptor
(I aInterceptor) Adds the givenHttpInterceptor
instance.default boolean
hasHttpInterceptor
(I aInterceptor) Tests whether the givenHttpInterceptor
instance has been added.default boolean
removeHttpInterceptor
(I aInterceptor) Removes theHttpInterceptor
instance.Methods inherited from interface org.refcodes.web.PostHttpInterceptable
addPostHttpInterceptor, hasPostHttpInterceptor, removePostHttpInterceptor
Methods inherited from interface org.refcodes.web.PreHttpInterceptable
addPreHttpInterceptor, hasPreHttpInterceptor, removePreHttpInterceptor
-
Method Details
-
hasHttpInterceptor
Tests whether the givenHttpInterceptor
instance has been added.- Parameters:
aInterceptor
- TheHttpInterceptor
instance 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 givenHttpInterceptor
instance. TheHttpInterceptor
instance itself acts as the handle which is used when removing the givenHttpInterceptor
instance later.- Parameters:
aInterceptor
- TheHttpInterceptor
instance which is to be added.- Returns:
- True in case
PreHttpInterceptable.addPreHttpInterceptor(PreHttpInterceptor)
orPostHttpInterceptable.addPostHttpInterceptor(PostHttpInterceptor)
return true.
-
removeHttpInterceptor
Removes theHttpInterceptor
instance. In case theHttpInterceptor
instance has not been added before, then false is returned.- Parameters:
aInterceptor
- TheHttpInterceptor
instance which is to be removed.- Returns:
- True in case
PreHttpInterceptable.removePreHttpInterceptor(PreHttpInterceptor)
orPostHttpInterceptable.removePostHttpInterceptor(PostHttpInterceptor)
return true.
-