Package org.restheart.mongodb
Class MongoService
- java.lang.Object
-
- org.restheart.mongodb.MongoService
-
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,MongoResponse>,HandlingPlugin<MongoRequest,MongoResponse>,Plugin,Service<MongoRequest,MongoResponse>
public class MongoService extends Object implements Service<MongoRequest,MongoResponse>
The Service that handles requests to mongodb resources- Author:
- Andrea Di Cesare
-
-
Constructor Summary
Constructors Constructor Description MongoService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(MongoRequest request, MongoResponse response)voidinit(PluginsRegistry registry)Function<io.undertow.server.HttpServerExchange,MongoRequest>request()Consumer<io.undertow.server.HttpServerExchange>requestInitializer()Return the MongoRequest initializerFunction<io.undertow.server.HttpServerExchange,MongoResponse>response()Consumer<io.undertow.server.HttpServerExchange>responseInitializer()-
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
-
Methods inherited from interface org.restheart.plugins.Service
handleOptions
-
-
-
-
Method Detail
-
init
public void init(PluginsRegistry registry)
-
handle
public void handle(MongoRequest request, MongoResponse response) throws Exception
- Specified by:
handlein interfaceService<MongoRequest,MongoResponse>- Throws:
Exception
-
requestInitializer
public Consumer<io.undertow.server.HttpServerExchange> requestInitializer()
Return the MongoRequest initializer- Specified by:
requestInitializerin interfaceService<MongoRequest,MongoResponse>- Returns:
-
responseInitializer
public Consumer<io.undertow.server.HttpServerExchange> responseInitializer()
- Specified by:
responseInitializerin interfaceService<MongoRequest,MongoResponse>
-
request
public Function<io.undertow.server.HttpServerExchange,MongoRequest> request()
- Specified by:
requestin interfaceService<MongoRequest,MongoResponse>
-
response
public Function<io.undertow.server.HttpServerExchange,MongoResponse> response()
- Specified by:
responsein interfaceService<MongoRequest,MongoResponse>
-
-