Class ServiceDiscoveryOptions


  • public class ServiceDiscoveryOptions
    extends Object
    Options to configure the service discovery.
    Author:
    Clement Escoffier
    • Constructor Detail

      • ServiceDiscoveryOptions

        public ServiceDiscoveryOptions()
        Creates a new instance of ServiceDiscoveryOptions using the default values.
      • ServiceDiscoveryOptions

        public ServiceDiscoveryOptions​(JsonObject json)
        Creates a new instance of ServiceDiscoveryOptions from its JSON representation.
        Parameters:
        json - the json object
    • Method Detail

      • getAnnounceAddress

        public String 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

        public ServiceDiscoveryOptions setAnnounceAddress​(String announceAddress)
        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 be null
        Returns:
        the current ServiceDiscoveryOptions
      • getBackendConfiguration

        public JsonObject getBackendConfiguration()
        Returns:
        the backend configuration. Cannot be null.
      • setBackendConfiguration

        public ServiceDiscoveryOptions setBackendConfiguration​(JsonObject backendConfiguration)
        Sets the configuration passed to the ServiceDiscoveryBackend. 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
      • getName

        public String getName()
        Gets the service discovery name used in service usage events. If not set the node id is used.
        Returns:
        the name
      • getUsageAddress

        public String getUsageAddress()
        Returns:
        the event bus address on which are sent the service usage events (bind / release).
      • setUsageAddress

        public ServiceDiscoveryOptions setUsageAddress​(String usageAddress)
        Sets the usage address: the event bus address on which are sent the service usage events (bind / release).
        Parameters:
        usageAddress - the address, {@link null} to disable use service usage tracking
        Returns:
        the current ServiceDiscoveryOptions