public class HostAddress extends Object
Constructor and Description |
---|
HostAddress(DnsName fqdn,
Exception e)
Constructs a new failed HostAddress.
|
HostAddress(DnsName fqdn,
int port,
List<InetAddress> inetAddresses)
Creates a new HostAddress with the given FQDN.
|
HostAddress(int port,
InetAddress hostAddress) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getErrorMessage() |
Map<InetAddress,Exception> |
getExceptions()
Retrieve the Exception that caused a connection failure to this HostAddress.
|
DnsName |
getFQDN()
Return the fully qualified domain name.
|
String |
getHost() |
List<InetAddress> |
getInetAddresses() |
int |
getPort() |
int |
hashCode() |
void |
setException(Exception exception) |
void |
setException(InetAddress inetAddress,
Exception exception) |
String |
toString() |
public HostAddress(DnsName fqdn, int port, List<InetAddress> inetAddresses)
fqdn
- the optional fully qualified domain name (FQDN).port
- The port to connect on.inetAddresses
- list of addresses.IllegalArgumentException
- If the port is out of valid range (0 - 65535).public HostAddress(int port, InetAddress hostAddress)
public HostAddress(DnsName fqdn, Exception e)
fqdn
- the domain name of the host.e
- the exception causing the failure.public DnsName getFQDN()
null
in case there host address is only numeric, i.e. an IP address.null
public int getPort()
public void setException(Exception exception)
public void setException(InetAddress inetAddress, Exception exception)
public Map<InetAddress,Exception> getExceptions()
SmackException.ConnectionException
will have an Exception set,
which can be retrieved with this method.public List<InetAddress> getInetAddresses()
public String getErrorMessage()