Package io.vertx.servicediscovery.consul
Class ImportedConsulService
- java.lang.Object
- 
- io.vertx.servicediscovery.consul.ImportedConsulService
 
- 
 public class ImportedConsulService extends Object Structure holding a service imported from Consul and published in the Vert.x service discovery.- Author:
- Clement Escoffier
 
- 
- 
Constructor SummaryConstructors Constructor Description ImportedConsulService(String name, String id, Record record)Creates a new instance ofImportedConsulService.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringname()ImportedConsulServiceregister(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 Detail- 
ImportedConsulServicepublic ImportedConsulService(String name, String id, Record record) Creates a new instance ofImportedConsulService.- Parameters:
- name- the service name
- id- the service id, may be the name
- record- the record (not yet registered)
 
 
- 
 - 
Method Detail- 
namepublic String name() - Returns:
- the name
 
 - 
registerpublic ImportedConsulService register(ServicePublisher publisher, Promise<ImportedConsulService> completion) Registers the service and completes the given future when done.- Parameters:
- publisher- the service publisher instance
- completion- the completion future
- Returns:
- the current ImportedConsulService
 
 - 
unregisterpublic void unregister(ServicePublisher publiher, Promise<Void> completion) Unregisters the service and completes the given future when done, if notnull- Parameters:
- publiher- the service publisher instance
- completion- the completion future
 
 
- 
 
-