Package rocks.xmpp.core.sasl
Class AuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- rocks.xmpp.core.XmppException
-
- rocks.xmpp.core.stream.StreamNegotiationException
-
- rocks.xmpp.core.sasl.AuthenticationException
-
- All Implemented Interfaces:
Serializable
public final class AuthenticationException extends StreamNegotiationException
An exception thrown during the login process, if SASL negotiation with the XMPP server fails.Typical error cases are invalid username and/or password in which case the failure condition is
Failure.Condition.NOT_AUTHORIZED
.If you want to know the exact failure case, ask for the condition as shown below:
catch (AuthenticationException e) { if (e.getCondition() == Failure.Condition.NOT_AUTHORIZED) { //... } }
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthenticationException(String message)
AuthenticationException(String message, Failure failure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Failure.Condition
getCondition()
The specific SASL error condition.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getCondition
public Failure.Condition getCondition()
The specific SASL error condition.- Returns:
- The error condition.
- See Also:
- 6.5. SASL Errors
-
-