Class DbPropsInjector
java.lang.Object
org.restheart.mongodb.interceptors.DbPropsInjector
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,,MongoResponse> Interceptor<MongoRequest,,MongoResponse> MongoInterceptor,Plugin
Injects the db properties into the MongoRequest
It is also responsible of sending NOT_FOUND in case of requests involving not
existing dbs (that are not PUT)
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(MongoRequest request, MongoResponse response) voidinit()Makes sure that dbs is instantiated after MongoClient initializationbooleanresolve(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
-
DbPropsInjector
public DbPropsInjector()
-
-
Method Details
-
init
public void init()Makes sure that dbs is instantiated after MongoClient initialization- Parameters:
mclient-
-
handle
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse> - Parameters:
request-response-- Throws:
Exception
-
resolve
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-