net.bluebones.boggle
Class HostInfo

java.lang.Object
  extended by net.bluebones.boggle.HostInfo

public class HostInfo
extends Object

Represents host information for use in connection to a game of Network Boggle.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker

Constructor Summary
HostInfo(String address, int port)
          Initialises a HostInfo with the specified values.
 
Method Summary
 String address()
          Gets the address of this HostInfo.
 String getAddr()
          Gets the RMI address of this HostInfo.
 String getSimpleAddr()
          Gets a simple representation of the host address in the following format: address:port.
 int port()
          Gets the TCP port number of this HostInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostInfo

public HostInfo(String address,
                int port)
Initialises a HostInfo with the specified values.

Parameters:
address - Address of host.
port - Port number of host.
Method Detail

address

public String address()
Gets the address of this HostInfo.

Returns:
Address - a hostname, an IP address or an FQDN.

port

public int port()
Gets the TCP port number of this HostInfo.

Returns:
TCP port number.

getSimpleAddr

public String getSimpleAddr()
Gets a simple representation of the host address in the following format: address:port.

Returns:
String simple representation of the host address.

getAddr

public String getAddr()
Gets the RMI address of this HostInfo.

Returns:
RMI address in //address:port/net.bluebones.Server format.