Class ImportedConsulService
java.lang.Object
io.vertx.servicediscovery.consul.ImportedConsulService
Structure holding a service imported from Consul and published in the Vert.x service discovery.
- Author:
- Clement Escoffier
-
Constructor Summary
ConstructorsConstructorDescriptionImportedConsulService(String name, String id, Record record) Creates a new instance ofImportedConsulService. -
Method Summary
Modifier and TypeMethodDescriptionname()register(ServicePublisher publisher, Promise<ImportedConsulService> completion) Registers the service and completes the given future when done.voidunregister(ServicePublisher publiher, Promise<Void> completion) Unregisters the service and completes the given future when done, if notnull
-
Constructor Details
-
ImportedConsulService
Creates a new instance ofImportedConsulService.- Parameters:
name- the service nameid- the service id, may be the namerecord- the record (not yet registered)
-
-
Method Details
-
name
- Returns:
- the name
-
register
public ImportedConsulService register(ServicePublisher publisher, Promise<ImportedConsulService> completion) Registers the service and completes the given future when done.- Parameters:
publisher- the service publisher instancecompletion- the completion future- Returns:
- the current
ImportedConsulService
-
unregister
Unregisters the service and completes the given future when done, if notnull- Parameters:
publiher- the service publisher instancecompletion- the completion future
-