Class ServiceDiscoveryOptions
java.lang.Object
io.vertx.servicediscovery.ServiceDiscoveryOptions
Options to configure the service discovery.
- Author:
- Clement Escoffier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofServiceDiscoveryOptionsusing the default values.Creates a new instance ofServiceDiscoveryOptionsfrom its JSON representation.Creates a new instance ofServiceDiscoveryOptionsby copying the values from another instance. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the service discovery name used in service usage events.setAnnounceAddress(String announceAddress) Sets the event bus address on which the service arrivals, departures and modifications are announced.setBackendConfiguration(JsonObject backendConfiguration) Sets the configuration passed to theServiceDiscoveryBackend.Sets the service discovery name used in the service usage events.setUsageAddress(String usageAddress) Sets the usage address: the event bus address on which are sent the service usage events (bind / release).toJson()Builds the JSON representation for the currentServiceDiscoveryOptions.
-
Field Details
-
DEFAULT_ANNOUNCE_ADDRESS
- See Also:
-
DEFAULT_USAGE_ADDRESS
- See Also:
-
-
Constructor Details
-
ServiceDiscoveryOptions
public ServiceDiscoveryOptions()Creates a new instance ofServiceDiscoveryOptionsusing the default values. -
ServiceDiscoveryOptions
Creates a new instance ofServiceDiscoveryOptionsby copying the values from another instance.- Parameters:
other- the instance to copy
-
ServiceDiscoveryOptions
Creates a new instance ofServiceDiscoveryOptionsfrom its JSON representation.- Parameters:
json- the json object
-
-
Method Details
-
toJson
Builds the JSON representation for the currentServiceDiscoveryOptions.- Returns:
- the json representation
-
getAnnounceAddress
- Returns:
- the event bus address on which the service arrivals, departures and modifications are announced. This address must be consistent in the whole application.
-
setAnnounceAddress
Sets the event bus address on which the service arrivals, departures and modifications are announced. This address must be consistent in the whole application.- Parameters:
announceAddress- the address, must not benull- Returns:
- the current
ServiceDiscoveryOptions
-
getBackendConfiguration
- Returns:
- the backend configuration. Cannot be
null.
-
setBackendConfiguration
Sets the configuration passed to theServiceDiscoveryBackend. Refer to the backend documentation to get more details on the requirements. The default backend does not need any configuration.- Parameters:
backendConfiguration- the backend configuration- Returns:
- the current
ServiceDiscoveryOptions
-
setName
Sets the service discovery name used in the service usage events. If not set, the node id is used.- Parameters:
name- the name to use.- Returns:
- the current
ServiceDiscoveryOptions
-
getName
Gets the service discovery name used in service usage events. If not set the node id is used.- Returns:
- the name
-
getUsageAddress
- Returns:
- the event bus address on which are sent the service usage events (bind / release).
-
setUsageAddress
Sets the usage address: the event bus address on which are sent the service usage events (bind / release).- Parameters:
usageAddress- the address,} to disable use service usage trackinginvalid @link
{@link null- Returns:
- the current
ServiceDiscoveryOptions
-