Class MongoDataSource
- java.lang.Object
-
- io.vertx.rxjava.servicediscovery.types.MongoDataSource
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<MongoDataSource>__TYPE_ARGstatic StringTYPEstatic StringUNKNOWNUnknown type.
-
Constructor Summary
Constructors Constructor Description MongoDataSource(MongoDataSource delegate)MongoDataSource(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RecordcreateRecord(String name, JsonObject location, JsonObject metadata)Convenient method to create a record for a Mongo data source.booleanequals(Object o)MongoDataSourcegetDelegate()static voidgetMongoClient(ServiceDiscovery discovery, JsonObject filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static voidgetMongoClient(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<MongoClient>> resultHandler)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static voidgetMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static voidgetMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration, Handler<AsyncResult<MongoClient>> resultHandler)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static voidgetMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static voidgetMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter, Handler<AsyncResult<MongoClient>> resultHandler)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.inthashCode()static MongoDataSourcenewInstance(MongoDataSource arg)static rx.Single<MongoClient>rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static rx.Single<MongoClient>rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static rx.Single<MongoClient>rxGetMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<MongoDataSource> __TYPE_ARG
-
UNKNOWN
public static final String UNKNOWN
Unknown type.- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoDataSource
public MongoDataSource(MongoDataSource delegate)
-
MongoDataSource
public MongoDataSource(Object delegate)
-
-
Method Detail
-
getDelegate
public MongoDataSource getDelegate()
-
createRecord
public static Record createRecord(String name, JsonObject location, JsonObject metadata)
Convenient method to create a record for a Mongo data source.- Parameters:
name- the service namelocation- the location of the service (e.g. url, port...)metadata- additional metadata- Returns:
- the created record
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalresultHandler- The result handler
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, JsonObject filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optional
-
rxGetMongoClient
public static rx.Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optional- Returns:
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter, Handler<AsyncResult<MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filterresultHandler- The result handler
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter
-
rxGetMongoClient
public static rx.Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, Function<Record,Boolean> filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter- Returns:
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration, Handler<AsyncResult<MongoClient>> resultHandler)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configurationresultHandler- the result handler
-
getMongoClient
public static void getMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configuration
-
rxGetMongoClient
public static rx.Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configuration- Returns:
-
newInstance
public static MongoDataSource newInstance(MongoDataSource arg)
-
-