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