com.sun.faban.harness.util
Class InterfaceProbe

java.lang.Object
  extended by com.sun.faban.harness.util.InterfaceProbe

public class InterfaceProbe
extends Object

The InterfaceProbe probes interfaces and finds the best interface to communicate with an IP address or host name.


Constructor Summary
InterfaceProbe()
          .
InterfaceProbe(ExecutorService executor)
          .
 
Method Summary
 Map<String,String> getIfMap(Collection<String> hosts, Map<String,String> ifMap)
          Fills the interface maps identifying which interface is to be used to communicate to a particular host.
static void main(String[] args)
          Unit tests the interface probe.
 void setExecutorService(ExecutorService executor)
          Sets the thread pool to be used for parallel probing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceProbe

public InterfaceProbe()
               throws SocketException
.

Throws:
SocketException

InterfaceProbe

public InterfaceProbe(ExecutorService executor)
               throws SocketException
.

Parameters:
executor -
Throws:
SocketException
Method Detail

main

public static void main(String[] args)
Unit tests the interface probe.

Parameters:
args - The commmand line arguments

setExecutorService

public void setExecutorService(ExecutorService executor)
Sets the thread pool to be used for parallel probing.

Parameters:
executor - The thread pool

getIfMap

public Map<String,String> getIfMap(Collection<String> hosts,
                                   Map<String,String> ifMap)
Fills the interface maps identifying which interface is to be used to communicate to a particular host.

Parameters:
hosts - The host list
ifMap - The host to interface map to fill
Returns:
The host to interface map provided, filled in