com.glub.secureftp.bean
Class HostInfo

java.lang.Object
  extended by com.glub.secureftp.bean.HostInfo

public class HostInfo
extends Object

The HostInfo class is responsible for holding host information.

Since:
2.0
Version:
$Revision: 47 $, $Date: 2009-05-16 10:10:12 -0700 (Sat, 16 May 2009) $

Constructor Summary
HostInfo()
          Create an empty HostInfo object.
HostInfo(InetAddress hostname, int port)
          Create a new HostInfo object.
HostInfo(String hostname, int port)
          Create a new HostInfo object.
 
Method Summary
 String getHostAddress()
          Get the IP address of the host.
 String getHostName()
          Get the hostname of the host.
 InetAddress getInetAddress()
          Get the InetAddress of the host.
 int getPort()
          Get the port of the host.
 void setHostName(InetAddress hostname)
          Set the hostname.
 void setHostName(String hostname)
          Set the hostname.
 void setPort(int port)
          Set the port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostInfo

public HostInfo()
Create an empty HostInfo object.


HostInfo

public HostInfo(InetAddress hostname,
                int port)
Create a new HostInfo object.

Parameters:
hostname - the hostname.
port - the port.

HostInfo

public HostInfo(String hostname,
                int port)
         throws UnknownHostException
Create a new HostInfo object.

Parameters:
hostname - the hostname.
port - the port.
Throws:
UnknownHostException
Method Detail

getInetAddress

public InetAddress getInetAddress()
Get the InetAddress of the host.

Returns:
the InetAddress.

getHostName

public String getHostName()
Get the hostname of the host.

Returns:
the hostname.

getHostAddress

public String getHostAddress()
Get the IP address of the host.

Returns:
the IP address.

setHostName

public void setHostName(InetAddress hostname)
Set the hostname.

Parameters:
hostname - the hostname.

setHostName

public void setHostName(String hostname)
                 throws UnknownHostException
Set the hostname.

Parameters:
hostname - the hostname.
Throws:
UnknownHostException

getPort

public int getPort()
Get the port of the host.

Returns:
the port.

setPort

public void setPort(int port)
Set the port.

Parameters:
port - the port.


Copyright © 2000-08 Glub Tech, Inc. All Rights Reserved.