Package | Description |
---|---|
io.vertx.servicediscovery |
= Vert.x Service Discovery
This component provides an infrastructure to publish and discover various resources, such as service
proxies, HTTP endpoints, data sources...
|
io.vertx.servicediscovery.spi | |
io.vertx.servicediscovery.types |
Modifier and Type | Method and Description |
---|---|
Record |
ServiceReference.record() |
Record |
Record.setLocation(io.vertx.core.json.JsonObject location)
Sets the json object describing the location of the service.
|
Record |
Record.setMetadata(io.vertx.core.json.JsonObject metadata) |
Record |
Record.setName(String name)
Sets the name of the service.
|
Record |
Record.setRegistration(String reg)
Sets the registration id.
|
Record |
Record.setStatus(Status status)
Sets the status of the service.
|
Record |
Record.setType(String type)
Sets the type of service.
|
Modifier and Type | Method and Description |
---|---|
static void |
RecordConverter.fromJson(io.vertx.core.json.JsonObject json,
Record obj) |
ServiceReference |
ServiceDiscovery.getReference(Record record)
Gets a service reference from the given record.
|
ServiceReference |
ServiceDiscovery.getReferenceWithConfiguration(Record record,
io.vertx.core.json.JsonObject configuration)
Gets a service reference from the given record, the reference is configured with the given json object.
|
void |
ServiceDiscovery.publish(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Publishes a record.
|
static void |
RecordConverter.toJson(Record obj,
io.vertx.core.json.JsonObject json) |
void |
ServiceDiscovery.update(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Updates the given record.
|
Modifier and Type | Method and Description |
---|---|
void |
ServiceDiscovery.getRecord(Function<Record,Boolean> filter,
boolean includeOutOfService,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Lookups for a single record.
|
void |
ServiceDiscovery.getRecord(Function<Record,Boolean> filter,
boolean includeOutOfService,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Lookups for a single record.
|
void |
ServiceDiscovery.getRecord(Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Lookups for a single record.
|
void |
ServiceDiscovery.getRecord(Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Lookups for a single record.
|
void |
ServiceDiscovery.getRecord(io.vertx.core.json.JsonObject filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Lookups for a single record.
|
void |
ServiceDiscovery.getRecords(Function<Record,Boolean> filter,
boolean includeOutOfService,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Lookups for a set of records.
|
void |
ServiceDiscovery.getRecords(Function<Record,Boolean> filter,
boolean includeOutOfService,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Lookups for a set of records.
|
void |
ServiceDiscovery.getRecords(Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Lookups for a set of records.
|
void |
ServiceDiscovery.getRecords(Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Lookups for a set of records.
|
void |
ServiceDiscovery.getRecords(io.vertx.core.json.JsonObject filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Lookups for a set of records.
|
void |
ServiceDiscovery.publish(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Publishes a record.
|
void |
ServiceDiscovery.update(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Updates the given record.
|
Constructor and Description |
---|
Record(Record other)
|
Modifier and Type | Method and Description |
---|---|
ServiceReference |
ServiceType.get(io.vertx.core.Vertx vertx,
ServiceDiscovery discovery,
Record record,
io.vertx.core.json.JsonObject configuration)
Gets the `service` for the given record.
|
void |
ServiceExporter.onPublish(Record record)
Notify a new record has been published, the record's registration can be used to uniquely
identify the record
|
void |
ServiceExporter.onUpdate(Record record)
Notify an existing record has been updated, the record's registration can be used to uniquely
identify the record
|
void |
ServicePublisher.publish(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Publishes a record.
|
void |
ServiceDiscoveryBackend.remove(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Removes a record.
|
void |
ServiceDiscoveryBackend.store(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Stores a record.
|
void |
ServiceDiscoveryBackend.update(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> resultHandler)
Updates a record
|
Modifier and Type | Method and Description |
---|---|
void |
ServiceDiscoveryBackend.getRecord(String uuid,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Get the record with the given uuid.
|
void |
ServiceDiscoveryBackend.getRecords(io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Record>>> resultHandler)
Gets all the records
|
void |
ServicePublisher.publish(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Publishes a record.
|
void |
ServiceDiscoveryBackend.remove(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Removes a record.
|
void |
ServiceDiscoveryBackend.remove(String uuid,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Removes a records based on its UUID.
|
void |
ServiceDiscoveryBackend.store(Record record,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Record>> resultHandler)
Stores a record.
|
Modifier and Type | Method and Description |
---|---|
static Record |
HttpEndpoint.createRecord(String name,
boolean ssl,
String host,
int port,
String root,
io.vertx.core.json.JsonObject metadata)
Same as
HttpEndpoint.createRecord(String, String, int, String, JsonObject) but let you configure whether or not the
service is using https . |
static Record |
JDBCDataSource.createRecord(String name,
io.vertx.core.json.JsonObject location,
io.vertx.core.json.JsonObject metadata) |
static Record |
RedisDataSource.createRecord(String name,
io.vertx.core.json.JsonObject location,
io.vertx.core.json.JsonObject metadata)
Convenient method to create a record for a Redis data source.
|
static Record |
MongoDataSource.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 Record |
HttpEndpoint.createRecord(String name,
String host)
Same as
HttpEndpoint.createRecord(String, String, int, String, JsonObject) but without metadata, using the port 80
and using "/" as root. |
static Record |
MessageSource.createRecord(String name,
String address)
Same as
MessageSource.createRecord(String, String, Class, JsonObject) without additional metadata, and no type for
the payload. |
static Record |
EventBusService.createRecord(String name,
String address,
Class itf)
Same as
EventBusService.createRecord(String, String, Class, JsonObject) but without metadata. |
static Record |
MessageSource.createRecord(String name,
String address,
Class type)
Same as
MessageSource.createRecord(String, String, Class, JsonObject) without additional metadata. |
static Record |
EventBusService.createRecord(String name,
String address,
Class itf,
io.vertx.core.json.JsonObject metadata)
Sugar method to creates a record for this type.
|
static Record |
MessageSource.createRecord(String name,
String address,
Class type,
io.vertx.core.json.JsonObject metadata)
Create a record representing a data producer.
|
static Record |
HttpEndpoint.createRecord(String name,
String host,
int port,
String root)
Same as
HttpEndpoint.createRecord(String, String, int, String, JsonObject) but without metadata. |
static Record |
HttpEndpoint.createRecord(String name,
String host,
int port,
String root,
io.vertx.core.json.JsonObject metadata)
Convenient method to create a record for a HTTP endpoint.
|
static Record |
EventBusService.createRecord(String name,
String address,
String classname)
Creates a record based on the parameters.
|
static Record |
MessageSource.createRecord(String name,
String address,
String type)
Same as
MessageSource.createRecord(String, String, String, JsonObject) without additional metadata. |
static Record |
EventBusService.createRecord(String name,
String address,
String itf,
io.vertx.core.json.JsonObject metadata)
Sugar method to creates a record for this type.
|
static Record |
MessageSource.createRecord(String name,
String address,
String type,
io.vertx.core.json.JsonObject metadata)
Create a record representing a data producer.
|
Record |
AbstractServiceReference.record() |
Modifier and Type | Method and Description |
---|---|
static void |
HttpEndpoint.getClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClient>> resultHandler)
Convenient method that looks for a HTTP endpoint and provides the configured
HttpClient . |
static void |
HttpEndpoint.getClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.json.JsonObject conf,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClient>> resultHandler)
Convenient method that looks for a HTTP endpoint and provides the configured
HttpClient . |
static <T> void |
MessageSource.getConsumer(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.eventbus.MessageConsumer<T>>> resultHandler)
Convenient method that looks for a message source and provides the configured
MessageConsumer . |
static void |
JDBCDataSource.getJDBCClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler)
Convenient method that looks for a JDBC datasource source and provides the configured
JDBCClient . |
static void |
JDBCDataSource.getJDBCClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.json.JsonObject consumerConfiguration,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler)
Convenient method that looks for a JDBC datasource source and provides the configured
JDBCClient . |
static void |
MongoDataSource.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 |
RedisDataSource.getRedisClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.redis.RedisClient>> resultHandler)
Convenient method that looks for a Redis data source and provides the configured
RedisClient . |
static void |
RedisDataSource.getRedisClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.json.JsonObject consumerConfiguration,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.redis.RedisClient>> resultHandler)
Convenient method that looks for a Redis data source and provides the configured
RedisClient . |
static <T> T |
EventBusService.getServiceProxy(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
Class<T> clientClass,
io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static void |
HttpEndpoint.getWebClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.web.client.WebClient>> resultHandler)
Convenient method that looks for a HTTP endpoint and provides the configured
WebClient . |
static void |
HttpEndpoint.getWebClient(ServiceDiscovery discovery,
Function<Record,Boolean> filter,
io.vertx.core.json.JsonObject conf,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.web.client.WebClient>> resultHandler)
Convenient method that looks for a HTTP endpoint and provides the configured
WebClient . |
Constructor and Description |
---|
AbstractServiceReference(io.vertx.core.Vertx vertx,
ServiceDiscovery discovery,
Record record)
Creates a new instance of
AbstractServiceReference . |
Copyright © 2017. All rights reserved.