public interface ServiceType
A service type is for example: `http-endpoint`, `data source`, `message source`. It defines what kind of resources is accessed through the service. For example, in the case of a `http endpoint`, the service object is a HTTP client. For `message source` it would a a consumer on which you set a handler receiving the message.
You can define your own service type by implementing this interface and configure the SPI file (META-INF/services/io.vertx.servicediscovery.spi.ServiceType) with your own implementation.
Modifier and Type | Method and Description |
---|---|
ServiceReference |
get(Vertx vertx,
ServiceDiscovery discovery,
Record record,
JsonObject configuration)
Gets the `service` for the given record.
|
String |
name() |
static final String UNKNOWN
String name()
ServiceReference get(Vertx vertx, ServiceDiscovery discovery, Record record, JsonObject configuration)
ServiceReference
, the consumer can start using the service and release it.vertx
- the vert.x instancediscovery
- the discovery instance requesting the referencerecord
- the recordconfiguration
- some optional configuration, maybe be null
or emptyServiceReference
Copyright © 2024 Eclipse. All rights reserved.