Package rocks.xmpp.core.stream.model
Class StreamErrorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- rocks.xmpp.core.XmppException
-
- rocks.xmpp.core.stream.model.StreamErrorException
-
- All Implemented Interfaces:
Serializable
public final class StreamErrorException extends XmppException
Represents a stream error.- See Also:
StreamError
, 4.9. Stream Errors, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StreamErrorException(StreamError streamError)
Constructs a stanza exception.StreamErrorException(StreamError streamError, Throwable cause)
Constructs a stream error exception with a cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Condition
getCondition()
Gets the defined error condition.StreamError
getError()
Gets the stream error.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
StreamErrorException
public StreamErrorException(StreamError streamError)
Constructs a stanza exception.- Parameters:
streamError
- The underlying stream error.
-
StreamErrorException
public StreamErrorException(StreamError streamError, Throwable cause)
Constructs a stream error exception with a cause.- Parameters:
streamError
- The underlying stream error.cause
- The cause.
-
-
Method Detail
-
getError
public final StreamError getError()
Gets the stream error.- Returns:
- The stream error.
-
getCondition
public final Condition getCondition()
Gets the defined error condition. If the condition is unknown,Condition.UNDEFINED_CONDITION
is returned. This is a shortcut forgetError().getCondition()
.- Returns:
- The error condition.
- See Also:
- 4.9.3. Defined Stream Error Conditions
-
-