Class DbPropsInjector
- java.lang.Object
-
- org.restheart.mongodb.interceptors.DbPropsInjector
-
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,MongoResponse>,Interceptor<MongoRequest,MongoResponse>,MongoInterceptor,Plugin
public class DbPropsInjector extends Object implements MongoInterceptor
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 Constructor Description DbPropsInjector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(MongoRequest request, MongoResponse response)voidinit(com.mongodb.MongoClient mclient)Makes sure that dbsDAO 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, wait
-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
-
-
-
Method Detail
-
init
public void init(com.mongodb.MongoClient mclient)
Makes sure that dbsDAO is instantiated after MongoClient initialization- Parameters:
mclient-
-
handle
public void handle(MongoRequest request, MongoResponse response) throws Exception
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse>- Parameters:
request-response-- Throws:
Exception
-
resolve
public boolean resolve(MongoRequest request, MongoResponse response)
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-
-