cgl.narada.transport.util
Class TransportProbe

java.lang.Object
  extended by cgl.narada.transport.util.TransportProbe

public class TransportProbe
extends Object

When NB program is running behind firewall or proxy server, the class can be used to probe the possibly allowed outward communication type. It probes for the connection possibility with various transport types at certain ports traditionally used in NB. It reporst the result on the console and then writes a configuration file which will be used by NB client to look for an ideal type of connection. The mechanism will work only when the remote host has acceptors running.


Field Summary
 boolean http80
           
 boolean http9045
           
 boolean multicast4045
           
 boolean ssl8045
           
 boolean tcp3045
          Test results -- default to false.
 boolean tcp5045
           
 boolean udp3045
           
 boolean udp80
           
 
Constructor Summary
TransportProbe()
           
 
Method Summary
 boolean httpProbe(String host, int port)
           
 String localHost()
           
static void main(String[] args)
           
 boolean multicastProbe(int port)
           
 boolean sslProbe(String host, int port, Properties prop)
           
 boolean tcpProbe(String host, int port)
          Test if a connection can be made to the remote host on certain port.
 boolean udpProbe(String host, int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tcp3045

public boolean tcp3045
Test results -- default to false. Other than tcp80, all other tests will take the CGL lab machine as the remote host; tcp80 will connect to a well known website, for example, www.iub.edu.


tcp5045

public boolean tcp5045

udp3045

public boolean udp3045

multicast4045

public boolean multicast4045

ssl8045

public boolean ssl8045

http9045

public boolean http9045

http80

public boolean http80

udp80

public boolean udp80
Constructor Detail

TransportProbe

public TransportProbe()
Method Detail

tcpProbe

public boolean tcpProbe(String host,
                        int port)
Test if a connection can be made to the remote host on certain port.

Parameters:
port - is the destination port which can be connected to.

udpProbe

public boolean udpProbe(String host,
                        int port)
                 throws Exception
Throws:
Exception

multicastProbe

public boolean multicastProbe(int port)
                       throws Exception
Throws:
Exception

httpProbe

public boolean httpProbe(String host,
                         int port)

sslProbe

public boolean sslProbe(String host,
                        int port,
                        Properties prop)

localHost

public String localHost()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


For comments and suggestions please send e-mail to The NaradaBrokering Project