public interface MongoDataSource extends ServiceType
Modifier and Type | Field and Description |
---|---|
static String |
TYPE |
UNKNOWN
Modifier and Type | Method and Description |
---|---|
static Record |
createRecord(String name,
io.vertx.core.json.JsonObject location,
io.vertx.core.json.JsonObject metadata)
Convenient method to create a record for a Mongo data source.
|
static void |
getMongoClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configured
MongoClient . |
static void |
getMongoClient(ServiceDiscovery discovery,
io.vertx.core.json.JsonObject filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configured
MongoClient . |
static void |
getMongoClient(ServiceDiscovery discovery,
io.vertx.core.json.JsonObject filter,
io.vertx.core.json.JsonObject consumerConfiguration,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configured
MongoClient . |
get, name
static final String TYPE
static Record createRecord(String name, io.vertx.core.json.JsonObject location, io.vertx.core.json.JsonObject metadata)
name
- the service namelocation
- the location of the service (e.g. url, port...)metadata
- additional metadatastatic void getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
MongoClient
. The
async result is marked as failed is there are no matching services, or if the lookup fails.discovery
- The service discovery instancefilter
- The filter, optionalresultHandler
- The result handlerstatic void getMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
MongoClient
. The
async result is marked as failed is there are no matching services, or if the lookup fails.discovery
- The service discovery instancefilter
- The filterresultHandler
- The result handlerstatic void getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClient>> resultHandler)
MongoClient
. The
async result is marked as failed is there are no matching services, or if the lookup fails.discovery
- The service discovery instancefilter
- The filter, optionalconsumerConfiguration
- the consumer configurationresultHandler
- the result handlerCopyright © 2017. All rights reserved.