Class MongoDataSource
java.lang.Object
io.vertx.rxjava3.servicediscovery.types.MongoDataSource
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<MongoDataSource> static final Stringstatic final StringUnknown type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RecordcreateRecord(String name, JsonObject location, JsonObject metadata) Convenient method to create a record for a Mongo data source.booleanstatic Single<MongoClient> getMongoClient(ServiceDiscovery discovery, JsonObject filter) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static Single<MongoClient> getMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static Single<MongoClient> getMongoClient(ServiceDiscovery discovery, Function<Record, Boolean> filter) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.inthashCode()static MongoDataSourcestatic Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static Single<MongoClient> rxGetMongoClient(ServiceDiscovery discovery, Function<Record, Boolean> filter) Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.toString()
-
Field Details
-
__TYPE_ARG
-
UNKNOWN
-
TYPE
- See Also:
-
-
Constructor Details
-
MongoDataSource
-
MongoDataSource
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
createRecord
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
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:
- a future notified with the client
-
rxGetMongoClient
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:
- a future notified with the client
-
getMongoClient
public static Single<MongoClient> 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- Returns:
- a future notified with the client
-
rxGetMongoClient
public static 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:
- a future notified with the client
-
getMongoClient
public static Single<MongoClient> 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- Returns:
- a future notified with the client
-
rxGetMongoClient
public static 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:
- a future notified with the client
-
newInstance
-