Class NetworkService


  • public final class NetworkService
    extends Object
    • Method Detail

      • resolveBindHostAddresses

        public InetAddress[] resolveBindHostAddresses​(String[] bindHosts)
                                               throws IOException
        Resolves bindHosts to a list of internet addresses. The list will not contain duplicate addresses.
        Parameters:
        bindHosts - list of hosts to bind to. this may contain special pseudo-hostnames such as _local_ (see the documentation). if it is null, it will fall back to _local_
        Returns:
        unique set of internet addresses
        Throws:
        IOException
      • resolvePublishHostAddresses

        public InetAddress resolvePublishHostAddresses​(String[] publishHosts)
                                                throws IOException
        Resolves publishHosts to a single publish address. The fact that it returns only one address is just a current limitation.

        If publishHosts resolves to more than one address, then one is selected with magic

        Parameters:
        publishHosts - list of hosts to publish as. this may contain special pseudo-hostnames such as _local_ (see the documentation). if it is null, it will fall back to _local_
        Returns:
        single internet address
        Throws:
        IOException