net.tomp2p.connection
Class DiscoverNetworks

java.lang.Object
  extended by 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

Constructor Summary
DiscoverNetworks()
           
 
Method Summary
static String discoverInterfaces(Bindings bindings)
          Search for local interfaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoverNetworks

public DiscoverNetworks()
Method Detail

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.