Class ContentSizeChecker
java.lang.Object
org.restheart.mongodb.interceptors.ContentSizeChecker
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,,MongoResponse> Interceptor<MongoRequest,,MongoResponse> MongoInterceptor,Plugin
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(MongoRequest request, MongoResponse response) booleanresolve(MongoRequest request, MongoResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefaultMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Constructor Details
-
ContentSizeChecker
public ContentSizeChecker()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse> - Throws:
Exception
-
resolve
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-