Class ContentSizeChecker
- java.lang.Object
-
- org.restheart.mongodb.interceptors.ContentSizeChecker
-
- All Implemented Interfaces:
ConfigurablePlugin
,ExchangeTypeResolver<MongoRequest,MongoResponse>
,Interceptor<MongoRequest,MongoResponse>
,MongoInterceptor
,Plugin
public class ContentSizeChecker extends Object implements MongoInterceptor
- Author:
- Andrea Di Cesare <[email protected]>
ContentSizeChecker allows to check the request content length on documents of
collections that have the following metadata:
{ "checkContentSize": { "max": MAX_SIZE, "min": MIN_SIZE } }
Sizes are in bytes
-
-
Constructor Summary
Constructors Constructor Description ContentSizeChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(MongoRequest request, MongoResponse response)
boolean
resolve(MongoRequest request, MongoResponse response)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
-
-
-
Method Detail
-
handle
public void handle(MongoRequest request, MongoResponse response) throws Exception
- Specified by:
handle
in interfaceInterceptor<MongoRequest,MongoResponse>
- Throws:
Exception
-
resolve
public boolean resolve(MongoRequest request, MongoResponse response)
- Specified by:
resolve
in interfaceInterceptor<MongoRequest,MongoResponse>
-
-