-
- All Implemented Interfaces:
-
java.io.Serializable
public class MqttException extends Exception
Thrown if an error occurs communicating with the server.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MqttException(int reasonCode)Constructs a new MqttExceptionwith the specified code as the underlying reason.MqttException(Throwable cause)Constructs a new MqttExceptionwith the specifiedThrowableas the underlying reason.MqttException(int reason, Throwable cause)Constructs a new MqttExceptionwith the specifiedThrowableas the underlying reason.
-
Method Summary
Modifier and Type Method Description intgetReasonCode()Returns the reason code for this exception. ThrowablegetCause()Returns the underlying cause of this exception, if available. StringgetMessage()Returns the detail message for this exception. StringtoString()Returns a Stringrepresentation of this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MqttException
MqttException(int reasonCode)
Constructs a newMqttExceptionwith the specified code as the underlying reason.- Parameters:
reasonCode- the reason code for the exception.
-
MqttException
MqttException(Throwable cause)
Constructs a newMqttExceptionwith the specifiedThrowableas the underlying reason.- Parameters:
cause- the underlying cause of the exception.
-
MqttException
MqttException(int reason, Throwable cause)
Constructs a newMqttExceptionwith the specifiedThrowableas the underlying reason.- Parameters:
reason- the reason code for the exception.cause- the underlying cause of the exception.
-
-
Method Detail
-
getReasonCode
int getReasonCode()
Returns the reason code for this exception.
-
getMessage
String getMessage()
Returns the detail message for this exception.
-
-
-
-