1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 10:37:59 +01:00

Add javadoc to SmackException.ConnectionException

and HostAddress
This commit is contained in:
Florian Schmaus 2014-06-17 11:00:05 +02:00
parent 02651c668f
commit 46f4a553e0
2 changed files with 15 additions and 0 deletions

View file

@ -122,6 +122,12 @@ public class SmackException extends Exception {
}
}
/**
* ConnectionException is thrown if Smack is unable to connect to all hosts of a given XMPP
* service. The failed hosts can be retrieved with
* {@link ConnectionException#getFailedAddresses()}, which will have the exception causing the
* connection failure set and retrievable with {@link HostAddress#getException()}.
*/
public static class ConnectionException extends SmackException {
/**

View file

@ -16,6 +16,8 @@
*/
package org.jivesoftware.smack.util.dns;
import org.jivesoftware.smack.SmackException.ConnectionException;
public class HostAddress {
private final String fqdn;
private final int port;
@ -66,6 +68,13 @@ public class HostAddress {
this.exception = e;
}
/**
* Retrieve the Exception that caused a connection failure to this HostAddress. Every
* HostAddress found in {@link ConnectionException} will have an Exception set,
* which can be retrieved with this method.
*
* @return the Exception causing this HostAddress to fail
*/
public Exception getException() {
return this.exception;
}