Package org.eclipse.hono.util
Enum CommandRouterConstants.CommandRouterAction
- java.lang.Object
-
- java.lang.Enum<CommandRouterConstants.CommandRouterAction>
-
- org.eclipse.hono.util.CommandRouterConstants.CommandRouterAction
-
- All Implemented Interfaces:
Serializable
,Comparable<CommandRouterConstants.CommandRouterAction>
- Enclosing class:
- CommandRouterConstants
public static enum CommandRouterConstants.CommandRouterAction extends Enum<CommandRouterConstants.CommandRouterAction>
Request actions that belong to the Command Router API.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description REGISTER_COMMAND_CONSUMER
The register command consumer operation.SET_LAST_KNOWN_GATEWAY
The set last known gateway for device operation.UNKNOWN
The unknown operation.UNREGISTER_COMMAND_CONSUMER
The unregister command consumer operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommandRouterConstants.CommandRouterAction
from(String subject)
Construct a CommandRouterAction 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 Command Router API action.static CommandRouterConstants.CommandRouterAction
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommandRouterConstants.CommandRouterAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SET_LAST_KNOWN_GATEWAY
public static final CommandRouterConstants.CommandRouterAction SET_LAST_KNOWN_GATEWAY
The set last known gateway for device operation.
-
REGISTER_COMMAND_CONSUMER
public static final CommandRouterConstants.CommandRouterAction REGISTER_COMMAND_CONSUMER
The register command consumer operation.
-
UNREGISTER_COMMAND_CONSUMER
public static final CommandRouterConstants.CommandRouterAction UNREGISTER_COMMAND_CONSUMER
The unregister command consumer operation.
-
UNKNOWN
public static final CommandRouterConstants.CommandRouterAction UNKNOWN
The unknown operation.
-
-
Method Detail
-
values
public static CommandRouterConstants.CommandRouterAction[] 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 (CommandRouterConstants.CommandRouterAction c : CommandRouterConstants.CommandRouterAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommandRouterConstants.CommandRouterAction 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 CommandRouterConstants.CommandRouterAction from(String subject)
Construct a CommandRouterAction from a subject.- Parameters:
subject
- The subject from which the CommandRouterAction needs to be constructed.- Returns:
- The CommandRouterAction as enum.
-
isValid
public static boolean isValid(String subject)
Helper method to check if a subject is a valid Command Router API action.- Parameters:
subject
- The subject to validate.- Returns:
- boolean
Boolean.TRUE
if the subject denotes a valid action,Boolean.FALSE
otherwise.
-
-