Class ListBasedAddressProviderBuilder

    • Method Detail

      • createAddressProvider

        public AddressProvider createAddressProvider​(ClassLoader loader)
        Create a new AddressProvider using the specified class loader.
        Specified by:
        createAddressProvider in interface AddressProviderFactory
        Parameters:
        loader - the optional ClassLoader with which to configure the new AddressProvider
        Returns:
        a new AddressProvider
      • add

        public ListBasedAddressProviderBuilder add​(String sAddr,
                                                   int nPort)
        Add an address and port.
        Parameters:
        sAddr - either an ip address or a host name
        nPort - a non-negative port
      • isRefreshable

        public boolean isRefreshable()
        Returns true if any of the added addresses has been computed to be a hostname.

        Introduced for unit testing.

        Returns:
        true iff the realized AddressProvider will refresh its list.
      • isEmpty

        public boolean isEmpty()
        Returns true if this builder contains no addresses.
        Returns:
        true if this builder contains no addresses