common
Class Bootstrap

java.lang.Object
  extended by common.Bootstrap

public class Bootstrap
extends java.lang.Object

A representation of a Bootstrap server.

Author:
Marco Cornolti and Alessandro Franchini

Field Summary
private  java.net.InetAddress ip
           
private  int RMIport
           
private  int UDPport
           
 
Constructor Summary
Bootstrap(java.net.InetAddress ip, int RMIport, int UDPport)
          A Bootstrap contructor.
Bootstrap(java.lang.String addr, int RMIport, int UDPport)
          A bootstrap constructor.
 
Method Summary
 java.net.InetAddress getIP()
           
 int getRMIPort()
           
 int getUDPPort()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ip

private java.net.InetAddress ip

RMIport

private int RMIport

UDPport

private int UDPport
Constructor Detail

Bootstrap

public Bootstrap(java.net.InetAddress ip,
                 int RMIport,
                 int UDPport)
A Bootstrap contructor.

Parameters:
ip - the Bootstrap server ip.
RMIport - the Bootstrap server RMI port.
UDPport - the Bootstrap server UDP port.

Bootstrap

public Bootstrap(java.lang.String addr,
                 int RMIport,
                 int UDPport)
          throws java.net.UnknownHostException
A bootstrap constructor.

Parameters:
addr - the hostname (or ip address) given as string.
RMIport - the RMI port.
UDPport - the UDP port.
Throws:
java.net.UnknownHostException - if the hostname given by argument could not be resolved.
Method Detail

getRMIPort

public int getRMIPort()
Returns:
the BS RMI port.

getUDPPort

public int getUDPPort()
Returns:
the BS UDP port.

getIP

public java.net.InetAddress getIP()
Returns:
the BS ip address.