Package org.restheart.plugins
Interface Interceptor<R extends Request<?>,S extends Response<?>>
-
- Type Parameters:
R- the request typeS- the response type
- All Superinterfaces:
ConfigurablePlugin,ExchangeTypeResolver<R,S>,Plugin
- All Known Subinterfaces:
BsonInterceptor,ByteArrayInterceptor,JsonInterceptor,MongoInterceptor,ProxyInterceptor
public interface Interceptor<R extends Request<?>,S extends Response<?>> extends ConfigurablePlugin, ExchangeTypeResolver<R,S>
Interceptors allow to snoop and modify requests and responses at different stages of the request lifecycle as defined by the interceptPoint parameter of the annotation RegisterPlugin. @see org.restheart.plugins.InterceptPoint An interceptor can intercept either proxied requests or requests handled by Services. An interceptor can intercept requests handled by a Service when its request and response types are equal to the ones declared by the Service. An interceptor can intercept a proxied request, when its request and response types extends BufferedRequest and BufferedResponse.- Author:
- Andrea Di Cesare
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandle(R request, S response)handle the requestbooleanresolve(R request, S response)-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
-