public final class DiscoverNetworks extends Object
Bindings class and provides all the necessary information,
then calls discoverInterfaces(Bindings). The results are stored in
Bindings as well.| Constructor and Description |
|---|
DiscoverNetworks(int checkIntervalMillis,
Bindings bindings,
ScheduledExecutorService timer) |
| Modifier and Type | Method and Description |
|---|---|
DiscoverNetworks |
addDiscoverNetworkListener(DiscoverNetworkListener listener) |
DiscoverResults |
currentDiscoverResults() |
static DiscoverResults |
discoverInterfaces(Bindings bindings) |
static DiscoverResults |
discoverInterfaces(Bindings bindings,
DiscoverResults oldDiscoverResults)
Search for local interfaces.
|
static DiscoverResults |
discoverNetwork(NetworkInterface networkInterface,
Collection<InetAddress> foundAddresses,
Collection<InetAddress> foundBroadcastAddresses,
boolean isIPv4,
boolean isIPv6)
Discovers network interfaces and addresses.
|
DiscoverNetworks |
removeDiscoverNetworkListener(DiscoverNetworkListener listener) |
FutureDone<Void> |
start() |
void |
stop() |
public DiscoverNetworks(int checkIntervalMillis,
Bindings bindings,
ScheduledExecutorService timer)
public FutureDone<Void> start()
public DiscoverResults currentDiscoverResults()
public void stop()
public DiscoverNetworks addDiscoverNetworkListener(DiscoverNetworkListener listener)
public DiscoverNetworks removeDiscoverNetworkListener(DiscoverNetworkListener listener)
public static DiscoverResults discoverInterfaces(Bindings bindings) throws IOException
IOExceptionpublic static DiscoverResults discoverInterfaces(Bindings bindings, DiscoverResults oldDiscoverResults) throws IOException
Bindings class. The results of
that search (InetAddress) are stored in Bindings as well.bindings - The hints for the search and also the results are stored thereoldDiscoverResults - IOException - If anything goes wrong, such as reflection.public static DiscoverResults discoverNetwork(NetworkInterface networkInterface, Collection<InetAddress> foundAddresses, Collection<InetAddress> foundBroadcastAddresses, boolean isIPv4, boolean isIPv6)
networkInterface - The networkInterface to search for addresses to listen tofoundAddresses - foundBroadcastAddresses - isIPv4 - isIPv6 - Copyright © 2014. All rights reserved.