|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.eclipse.paho.client.mqttv3.MqttException
Thrown if an error occurs communicating with the server.
| Field Summary | |
|---|---|
static short |
REASON_CODE_BROKER_UNAVAILABLE
The broker was not available to handle the request. |
static short |
REASON_CODE_CLIENT_ALREADY_CONNECTED
The client is already connected. |
static short |
REASON_CODE_CLIENT_ALREADY_DISCONNECTED
The client is already disconnected. |
static short |
REASON_CODE_CLIENT_DISCONNECT_PROHIBITED
Thrown when an attempt to call MqttClient.disconnect() has been
made from within a method on MqttCallback. |
static short |
REASON_CODE_CLIENT_DISCONNECTING
The client is currently disconnecting and cannot accept any new work. |
static short |
REASON_CODE_CLIENT_EXCEPTION
Client encountered an exception. |
static short |
REASON_CODE_CLIENT_NOT_CONNECTED
The client is not connected to the server. |
static short |
REASON_CODE_CLIENT_TIMEOUT
Client timed out while waiting for a response from the server. |
static short |
REASON_CODE_CONNECTION_LOST
The client has been unexpectedly disconnected from the server. |
static short |
REASON_CODE_FAILED_AUTHENTICATION
Authentication with the server has failed, due to a bad user name or password. |
static short |
REASON_CODE_INVALID_CLIENT_ID
The server has rejected the supplied client ID |
static short |
REASON_CODE_INVALID_MESSAGE
Protocol error: the message was not recognized as a valid MQTT packet. |
static short |
REASON_CODE_INVALID_PROTOCOL_VERSION
The protocol version requested is not supported by the server. |
static short |
REASON_CODE_NO_MESSAGE_IDS_AVAILABLE
Internal error, caused by no new message IDs being available. |
static short |
REASON_CODE_NOT_AUTHORIZED
Not authorized to perform the requested operation |
static short |
REASON_CODE_SERVER_CONNECT_ERROR
Unable to connect to server |
static short |
REASON_CODE_SOCKET_FACTORY_MISMATCH
Server URI and supplied SocketFactory do not match.
|
static short |
REASON_CODE_SSL_CONFIG_ERROR
SSL configuration error. |
static short |
REASON_CODE_UNEXPECTED_ERROR
An unexpected error has occurred. |
| Constructor Summary | |
|---|---|
MqttException(int reasonCode)
Constructs a new MqttException with the specified code
as the underlying reason. |
|
MqttException(int reason,
java.lang.Throwable cause)
Constructs a new MqttException with the specified
Throwable as the underlying reason. |
|
MqttException(java.lang.Throwable cause)
Constructs a new MqttException with the specified
Throwable as the underlying reason. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Returns the underlying cause of this exception, if available. |
java.lang.String |
getMessage()
Returns the detail message for this exception. |
int |
getReasonCode()
Returns the reason code for this exception. |
java.lang.String |
toString()
Returns a String representation of this exception. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final short REASON_CODE_CLIENT_EXCEPTION
getCause()
method to get the underlying reason.
public static final short REASON_CODE_INVALID_PROTOCOL_VERSION
public static final short REASON_CODE_INVALID_CLIENT_ID
public static final short REASON_CODE_BROKER_UNAVAILABLE
public static final short REASON_CODE_FAILED_AUTHENTICATION
public static final short REASON_CODE_NOT_AUTHORIZED
public static final short REASON_CODE_UNEXPECTED_ERROR
public static final short REASON_CODE_CLIENT_TIMEOUT
public static final short REASON_CODE_NO_MESSAGE_IDS_AVAILABLE
public static final short REASON_CODE_CLIENT_ALREADY_CONNECTED
public static final short REASON_CODE_CLIENT_ALREADY_DISCONNECTED
public static final short REASON_CODE_CLIENT_DISCONNECTING
public static final short REASON_CODE_SERVER_CONNECT_ERROR
public static final short REASON_CODE_CLIENT_NOT_CONNECTED
MqttClient.connect()
or MqttClient.connect(MqttConnectOptions) method must be called
first. It is also possible that the connection was lost - see
MqttClient.setCallback(MqttCallback) for a way to track lost
connections.
public static final short REASON_CODE_SOCKET_FACTORY_MISMATCH
SocketFactory do not match.
URIs beginning tcp:// must use a javax.net.SocketFactory,
and URIs beginning ssl:// must use a javax.net.ssl.SSLSocketFactory.
public static final short REASON_CODE_SSL_CONFIG_ERROR
public static final short REASON_CODE_CLIENT_DISCONNECT_PROHIBITED
MqttClient.disconnect() has been
made from within a method on MqttCallback. These methods are invoked
by the client's thread, and must not be used to control disconnection.
MqttCallback.messageArrived(MqttTopic, MqttMessage),
Constant Field Valuespublic static final short REASON_CODE_INVALID_MESSAGE
public static final short REASON_CODE_CONNECTION_LOST
cause
will provide more details.
| Constructor Detail |
public MqttException(int reasonCode)
MqttException with the specified code
as the underlying reason.
reasonCode - the reason code for the exception.public MqttException(java.lang.Throwable cause)
MqttException with the specified
Throwable as the underlying reason.
cause - the underlying cause of the exception.
public MqttException(int reason,
java.lang.Throwable cause)
MqttException with the specified
Throwable as the underlying reason.
reason - the reason code for the exception.cause - the underlying cause of the exception.| Method Detail |
public int getReasonCode()
public java.lang.Throwable getCause()
null.public java.lang.String getMessage()
null.public java.lang.String toString()
String representation of this exception.
String representation of this exception.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||