public class HostInfo extends Object
InetAddress
to connect to a host.
Similar to an InetSocketAddress
except that it can be constructed
fully resolved, with an InetAddress
and a hostname.Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getHostName() |
InetAddress |
getInetAddress() |
int |
getPortNumber() |
int |
hashCode() |
boolean |
isResolved() |
boolean |
isSsl() |
void |
setSsl(boolean ssl) |
String |
toString() |
public HostInfo(String hostName, InetSocketAddress addr)
HostInfo
.hostName
- addr
- public HostInfo(String host, int port)
HostInfo
that can resolve each
time an InetAddress
is asked for.host
- port
- public InetAddress getInetAddress() throws UnknownHostException
UnknownHostException
public String getHostName()
public int getPortNumber()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean isResolved()
public boolean isSsl()
public void setSsl(boolean ssl)
Copyright © 2018 JBoss by Red Hat. All rights reserved.