com.glub.secureftp.bean
Class HostInfo

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

public class HostInfo
extends java.lang.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(java.net.InetAddress hostname, int port)
          Create a new HostInfo object.
HostInfo(java.lang.String hostname, int port)
          Create a new HostInfo object.
 
Method Summary
 java.lang.String getHostAddress()
          Get the IP address of the host.
 java.lang.String getHostName()
          Get the hostname of the host.
 java.net.InetAddress getInetAddress()
          Get the InetAddress of the host.
 int getPort()
          Get the port of the host.
 void setHostName(java.net.InetAddress hostname)
          Set the hostname.
 void setHostName(java.lang.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(java.net.InetAddress hostname,
                int port)
Create a new HostInfo object.

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

HostInfo

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

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

getInetAddress

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

Returns:
the InetAddress.

getHostName

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

Returns:
the hostname.

getHostAddress

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

Returns:
the IP address.

setHostName

public void setHostName(java.net.InetAddress hostname)
Set the hostname.

Parameters:
hostname - the hostname.

setHostName

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

Parameters:
hostname - the hostname.
Throws:
java.net.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-10 Glub Tech, Inc. All Rights Reserved.