Package org.eclipse.hono.adapter.mqtt
Enum MqttContext.ErrorHandlingMode
- java.lang.Object
-
- java.lang.Enum<MqttContext.ErrorHandlingMode>
-
- org.eclipse.hono.adapter.mqtt.MqttContext.ErrorHandlingMode
-
- All Implemented Interfaces:
Serializable,Comparable<MqttContext.ErrorHandlingMode>
- Enclosing class:
- MqttContext
public static enum MqttContext.ErrorHandlingMode extends Enum<MqttContext.ErrorHandlingMode>
Modes defining how to handle errors raised when a device publishes a message.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTUse the default error handling mode:IGNOREif the device is subscribed to the error topic orDISCONNECTotherwise.DISCONNECTDisconnect on error.IGNOREIgnore errors, send PUB_ACK if QoS is 1.SKIP_ACKIgnore errors and don't send PUB_ACK if QoS is 1.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MqttContext.ErrorHandlingModefrom(String paramValue)Construct an ErrorHandlingMode object from an MQTT topic property bag parameter value.static MqttContext.ErrorHandlingModevalueOf(String name)Returns the enum constant of this type with the specified name.static MqttContext.ErrorHandlingMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISCONNECT
public static final MqttContext.ErrorHandlingMode DISCONNECT
Disconnect on error.
-
IGNORE
public static final MqttContext.ErrorHandlingMode IGNORE
Ignore errors, send PUB_ACK if QoS is 1.
-
SKIP_ACK
public static final MqttContext.ErrorHandlingMode SKIP_ACK
Ignore errors and don't send PUB_ACK if QoS is 1.
-
DEFAULT
public static final MqttContext.ErrorHandlingMode DEFAULT
Use the default error handling mode:IGNOREif the device is subscribed to the error topic orDISCONNECTotherwise.
-
-
Method Detail
-
values
public static MqttContext.ErrorHandlingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MqttContext.ErrorHandlingMode c : MqttContext.ErrorHandlingMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MqttContext.ErrorHandlingMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
from
public static MqttContext.ErrorHandlingMode from(String paramValue)
Construct an ErrorHandlingMode object from an MQTT topic property bag parameter value.- Parameters:
paramValue- The parameter value to parse.- Returns:
- The parsed ErrorHandlingMode with
DEFAULTas default.
-
-