org.teiid.net
Class HostInfo

java.lang.Object
  extended by org.teiid.net.HostInfo

public class HostInfo
extends Object

Defines the hostname/port or InetAddress to connect to a host. Similar to an InetSocketAddress except that it can be constructed fully resolved, with an InetAddress and a hostname.

Since:
4.2

Constructor Summary
HostInfo(String hostName, InetSocketAddress addr)
          Construct a fully resolved HostInfo.
HostInfo(String host, int port)
          Construct a HostInfo that can resolve each time an InetAddress is asked for.
 
Method Summary
 boolean equals(Object obj)
           
 String getHostName()
           
 InetAddress getInetAddress()
           
 int getPortNumber()
           
 int hashCode()
           
 boolean isResolved()
           
 boolean isSsl()
           
 void setSsl(boolean ssl)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostInfo

public HostInfo(String hostName,
                InetSocketAddress addr)
Construct a fully resolved HostInfo.

Parameters:
hostName -
addr -

HostInfo

public HostInfo(String host,
                int port)
Construct a HostInfo that can resolve each time an InetAddress is asked for.

Parameters:
host -
port -
Method Detail

getInetAddress

public InetAddress getInetAddress()
                           throws UnknownHostException
Throws:
UnknownHostException

getHostName

public String getHostName()

getPortNumber

public int getPortNumber()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Since:
4.2
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Since:
4.2
See Also:
Object.hashCode()

isResolved

public boolean isResolved()

isSsl

public boolean isSsl()

setSsl

public void setSsl(boolean ssl)


Copyright © 2011. All Rights Reserved.