Package org.eclipse.hono.util
Enum DeviceConnectionConstants.DeviceConnectionAction
- java.lang.Object
-
- java.lang.Enum<DeviceConnectionConstants.DeviceConnectionAction>
-
- org.eclipse.hono.util.DeviceConnectionConstants.DeviceConnectionAction
-
- All Implemented Interfaces:
Serializable
,Comparable<DeviceConnectionConstants.DeviceConnectionAction>
- Enclosing class:
- DeviceConnectionConstants
public static enum DeviceConnectionConstants.DeviceConnectionAction extends Enum<DeviceConnectionConstants.DeviceConnectionAction>
Request actions that belong to the Device Connection API.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GET_CMD_HANDLING_ADAPTER_INSTANCES
The get command handling protocol adapter instances operation.GET_LAST_GATEWAY
The get last known gateway for device operation.REMOVE_CMD_HANDLING_ADAPTER_INSTANCE
The remove command handling protocol adapter instance operation.SET_CMD_HANDLING_ADAPTER_INSTANCE
The set command handling protocol adapter instance operation.SET_LAST_GATEWAY
The set last known gateway for device operation.UNKNOWN
The unknown operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeviceConnectionConstants.DeviceConnectionAction
from(String subject)
Construct a DeviceConnectionAction from a subject.String
getSubject()
Gets the AMQP message subject corresponding to this action.static boolean
isValid(String subject)
Helper method to check if a subject is a valid Device Connection API action.static DeviceConnectionConstants.DeviceConnectionAction
valueOf(String name)
Returns the enum constant of this type with the specified name.static DeviceConnectionConstants.DeviceConnectionAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GET_LAST_GATEWAY
public static final DeviceConnectionConstants.DeviceConnectionAction GET_LAST_GATEWAY
The get last known gateway for device operation.
-
SET_LAST_GATEWAY
public static final DeviceConnectionConstants.DeviceConnectionAction SET_LAST_GATEWAY
The set last known gateway for device operation.
-
GET_CMD_HANDLING_ADAPTER_INSTANCES
public static final DeviceConnectionConstants.DeviceConnectionAction GET_CMD_HANDLING_ADAPTER_INSTANCES
The get command handling protocol adapter instances operation.
-
SET_CMD_HANDLING_ADAPTER_INSTANCE
public static final DeviceConnectionConstants.DeviceConnectionAction SET_CMD_HANDLING_ADAPTER_INSTANCE
The set command handling protocol adapter instance operation.
-
REMOVE_CMD_HANDLING_ADAPTER_INSTANCE
public static final DeviceConnectionConstants.DeviceConnectionAction REMOVE_CMD_HANDLING_ADAPTER_INSTANCE
The remove command handling protocol adapter instance operation.
-
UNKNOWN
public static final DeviceConnectionConstants.DeviceConnectionAction UNKNOWN
The unknown operation.
-
-
Method Detail
-
values
public static DeviceConnectionConstants.DeviceConnectionAction[] 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 (DeviceConnectionConstants.DeviceConnectionAction c : DeviceConnectionConstants.DeviceConnectionAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DeviceConnectionConstants.DeviceConnectionAction 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
-
getSubject
public String getSubject()
Gets the AMQP message subject corresponding to this action.- Returns:
- The subject.
-
from
public static DeviceConnectionConstants.DeviceConnectionAction from(String subject)
Construct a DeviceConnectionAction from a subject.- Parameters:
subject
- The subject from which the DeviceConnectionAction needs to be constructed.- Returns:
- The DeviceConnectionAction as enum
-
isValid
public static boolean isValid(String subject)
Helper method to check if a subject is a valid Device Connection API action.- Parameters:
subject
- The subject to validate.- Returns:
- boolean
Boolean.TRUE
if the subject denotes a valid action,Boolean.FALSE
otherwise.
-
-