public class HostAddress extends Object
Constructor and Description |
---|
HostAddress(int port,
InetAddress hostAddress) |
HostAddress(String fqdn,
Exception e)
Constructs a new failed HostAddress.
|
HostAddress(String fqdn,
int port,
List<InetAddress> inetAddresses)
Creates a new HostAddress with the given FQDN.
|
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.
|
String |
getFQDN() |
List<InetAddress> |
getInetAddresses() |
int |
getPort() |
int |
hashCode() |
void |
setException(Exception exception) |
void |
setException(InetAddress inetAddress,
Exception exception) |
String |
toString() |
public HostAddress(String fqdn, int port, List<InetAddress> inetAddresses)
fqdn
- the optional fully qualified domain name (FQDN).port
- The port to connect on.IllegalArgumentException
- If the port is out of valid range (0 - 65535).public HostAddress(int port, InetAddress hostAddress)
public HostAddress(String fqdn, Exception e)
fqdn
- the domain name of the host.e
- the exception causing the failure.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()