NetworkTopologyDiscovery
Date: 2017-02-10

javax.jmdns

## Interface NetworkTopologyDiscovery

- All Known Implementing Classes:
    NetworkTopologyDiscoveryImpl

      public interface NetworkTopologyDiscovery

  This class is used to resolve the list of Internet address to use when attaching JmDNS to the network.

  To create you own filtering class for Internet Addresses you will need to implement the class and the factory delegate. These must be called before any other call to JmDNS.

       public static class MyNetworkTopologyDiscovery implements NetworkTopologyDiscovery {

           @Override
           public InetAddress[] getInetAddresses() {
               // TODO Auto-generated method stub
               return null;
           }

           @Override
           public boolean useInetAddress(NetworkInterface networkInterface, InetAddress interfaceAddress) {
               // TODO Auto-generated method stub
               return false;
           }

       }

       public static class MyClass implements NetworkTopologyDiscovery.Factory.ClassDelegate {
           public MyClass() {
               super();
               NetworkTopologyDiscovery.Factory.setClassDelegate(this);

               // Access JmDNS or JmmDNS
           }

           @Override
           public NetworkTopologyDiscovery newNetworkTopologyDiscovery() {
               return new MyNetworkTopologyDiscovery();
           }

       }

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `NetworkTopologyDiscovery.Factory` NetworkTopologyDiscovery.Factory enable the creation of new instance of NetworkTopologyDiscovery.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.InetAddress[]` | `getInetAddresses()` Get all local Internet Addresses for the machine.
    `void` | `lockInetAddress(java.net.InetAddress interfaceAddress)` Locks the given InetAddress if the device requires it.
    `void` | `unlockInetAddress(java.net.InetAddress interfaceAddress)` Locks the given InetAddress if the device requires it.
    `boolean` | `useInetAddress(java.net.NetworkInterface networkInterface, java.net.InetAddress interfaceAddress)` Check if a given InetAddress should be used for mDNS

- - ### Method Detail

    - #### getInetAddresses

          java.net.InetAddress[] getInetAddresses()

      Get all local Internet Addresses for the machine.
      Returns:
        Set of InetAddress

    - #### useInetAddress

          boolean useInetAddress(java.net.NetworkInterface networkInterface,
                               java.net.InetAddress interfaceAddress)

      Check if a given InetAddress should be used for mDNS
      Parameters:
        `networkInterface` -
        `interfaceAddress` -
      Returns:
        `true` is the address is to be used, `false` otherwise.

    - #### lockInetAddress

          void lockInetAddress(java.net.InetAddress interfaceAddress)

      Locks the given InetAddress if the device requires it.
      Parameters:
        `interfaceAddress` -

    - #### unlockInetAddress

          void unlockInetAddress(java.net.InetAddress interfaceAddress)

      Locks the given InetAddress if the device requires it.
      Parameters:
        `interfaceAddress` -