net.tomp2p.connection
Class DiscoverNetworks
java.lang.Object
net.tomp2p.connection.DiscoverNetworks
public class DiscoverNetworks
- extends Object
A class to search for addresses to bind the sockets to. The user first
creates a Bindings
class and provides all the necesary information, then calls
discoverInterfaces(Bindings)
. The results are stored in Bindings
as
well.
- Author:
- Thomas Bocek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiscoverNetworks
public DiscoverNetworks()
discoverInterfaces
public static String discoverInterfaces(Bindings bindings)
throws Exception
- Search for local interfaces. Hints how to search for those interfaces are
provided by the user throug the
Bindings
class. The results of that
search (InetAddress) are stored in Bindings
as well.
- Parameters:
bindings
- The hints for the search and also the results are stored
there
- Returns:
- The status of the search
- Throws:
Exception
- If anything goes wrong, such as reflecetion.
Copyright © 2012. All Rights Reserved.