public interface NetworkTopologyDiscovery
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(); } }
Modifier and Type | Interface and Description |
---|---|
static class |
NetworkTopologyDiscovery.Factory
NetworkTopologyDiscovery.Factory enable the creation of new instance of NetworkTopologyDiscovery.
|
Modifier and Type | Method and Description |
---|---|
InetAddress[] |
getInetAddresses()
Get all local Internet Addresses for the machine.
|
void |
lockInetAddress(InetAddress interfaceAddress)
Locks the given InetAddress if the device requires it.
|
void |
unlockInetAddress(InetAddress interfaceAddress)
Locks the given InetAddress if the device requires it.
|
boolean |
useInetAddress(NetworkInterface networkInterface,
InetAddress interfaceAddress)
Check if a given InetAddress should be used for mDNS
|
InetAddress[] getInetAddresses()
boolean useInetAddress(NetworkInterface networkInterface, InetAddress interfaceAddress)
networkInterface
- interfaceAddress
- true
is the address is to be used, false
otherwise.void lockInetAddress(InetAddress interfaceAddress)
interfaceAddress
- void unlockInetAddress(InetAddress interfaceAddress)
interfaceAddress
- Copyright © 2002–2016 JmDNS. All rights reserved.