public class ServiceDiscoveryOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ANNOUNCE_ADDRESS |
static String |
DEFAULT_USAGE_ADDRESS |
Constructor and Description |
---|
ServiceDiscoveryOptions()
Creates a new instance of
ServiceDiscoveryOptions using the default values. |
ServiceDiscoveryOptions(JsonObject json)
Creates a new instance of
ServiceDiscoveryOptions from its JSON representation. |
ServiceDiscoveryOptions(ServiceDiscoveryOptions other)
Creates a new instance of
ServiceDiscoveryOptions by copying the values from another instance. |
Modifier and Type | Method and Description |
---|---|
String |
getAnnounceAddress() |
JsonObject |
getBackendConfiguration() |
String |
getName()
Gets the service discovery name used in service usage events.
|
String |
getUsageAddress() |
ServiceDiscoveryOptions |
setAnnounceAddress(String announceAddress)
Sets the event bus address on which the service arrivals, departures and modifications are announced.
|
ServiceDiscoveryOptions |
setBackendConfiguration(JsonObject backendConfiguration)
Sets the configuration passed to the
ServiceDiscoveryBackend . |
ServiceDiscoveryOptions |
setName(String name)
Sets the service discovery name used in the service usage events.
|
ServiceDiscoveryOptions |
setUsageAddress(String usageAddress)
Sets the usage address: the event bus address on which are sent the service usage events (bind / release).
|
JsonObject |
toJson()
Builds the JSON representation for the current
ServiceDiscoveryOptions . |
public static final String DEFAULT_ANNOUNCE_ADDRESS
public static final String DEFAULT_USAGE_ADDRESS
public ServiceDiscoveryOptions()
ServiceDiscoveryOptions
using the default values.public ServiceDiscoveryOptions(ServiceDiscoveryOptions other)
ServiceDiscoveryOptions
by copying the values from another instance.other
- the instance to copypublic ServiceDiscoveryOptions(JsonObject json)
ServiceDiscoveryOptions
from its JSON representation.json
- the json objectpublic JsonObject toJson()
ServiceDiscoveryOptions
.public String getAnnounceAddress()
public ServiceDiscoveryOptions setAnnounceAddress(String announceAddress)
announceAddress
- the address, must not be null
ServiceDiscoveryOptions
public JsonObject getBackendConfiguration()
null
.public ServiceDiscoveryOptions setBackendConfiguration(JsonObject backendConfiguration)
ServiceDiscoveryBackend
.
Refer to the backend documentation to get more details on the requirements. The default backend
does not need any configuration.backendConfiguration
- the backend configurationServiceDiscoveryOptions
public ServiceDiscoveryOptions setName(String name)
name
- the name to use.ServiceDiscoveryOptions
public String getName()
public String getUsageAddress()
public ServiceDiscoveryOptions setUsageAddress(String usageAddress)
usageAddress
- the address, null
to disable use service usage trackingServiceDiscoveryOptions
Copyright © 2021 Eclipse. All rights reserved.