Package org.eclipse.hono.util
Class CommandConstants
- java.lang.Object
-
- org.eclipse.hono.util.CommandConstants
-
public class CommandConstants extends Object
Commands utility methods used throughout the Command and Control API.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_ENDPOINT
The name of the Command and Control API endpoint.static String
COMMAND_ENDPOINT_SHORT
The short name of the control endpoint.static String
COMMAND_RESPONSE_ENDPOINT
The name of the Command and Control API endpoint provided by protocol adapters that use a separate endpoint for command responses.static String
COMMAND_RESPONSE_REQUEST_PART
The part of the address for a command response between a device and an adapter, which identifies the request.static String
COMMAND_RESPONSE_REQUEST_PART_SHORT
Short version of COMMAND_RESPONSE_REQUEST_PART.static String
COMMAND_RESPONSE_RESPONSE_PART
The part of the address for a command response between a device and an adapter, which identifies the response.static String
COMMAND_RESPONSE_RESPONSE_PART_SHORT
Short version of COMMAND_RESPONSE_RESPONSE_PART.static String
INTERNAL_COMMAND_ENDPOINT
The name of the internal Command and Control API endpoint used to forward commands to the right protocol adapter.static String
NORTHBOUND_COMMAND_REQUEST_ENDPOINT
The name of the northbound Command and Control API request endpoint used by northbound applications.static String
NORTHBOUND_COMMAND_RESPONSE_ENDPOINT
The name of the northbound Command and Control API response endpoint used by northbound applications.static int
TOPIC_POSITION_RESPONSE_REQ_ID
Position of the request id in the MQTT command response topic.static int
TOPIC_POSITION_RESPONSE_STATUS
Position of the status code in the MQTT command response topic.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isCommandEndpoint(String endpoint)
Returnstrue
if the passed endpoint denotes a command endpoint (full or short version).static boolean
isNorthboundCommandResponseEndpoint(String endpoint)
Returnstrue
if the passed endpoint denotes a command response endpoint as used by northbound applications.
-
-
-
Field Detail
-
COMMAND_ENDPOINT
public static final String COMMAND_ENDPOINT
The name of the Command and Control API endpoint.- See Also:
- Constant Field Values
-
COMMAND_ENDPOINT_SHORT
public static final String COMMAND_ENDPOINT_SHORT
The short name of the control endpoint.- See Also:
- Constant Field Values
-
COMMAND_RESPONSE_ENDPOINT
public static final String COMMAND_RESPONSE_ENDPOINT
The name of the Command and Control API endpoint provided by protocol adapters that use a separate endpoint for command responses.- See Also:
- Constant Field Values
-
INTERNAL_COMMAND_ENDPOINT
public static final String INTERNAL_COMMAND_ENDPOINT
The name of the internal Command and Control API endpoint used to forward commands to the right protocol adapter.- See Also:
- Constant Field Values
-
NORTHBOUND_COMMAND_REQUEST_ENDPOINT
public static final String NORTHBOUND_COMMAND_REQUEST_ENDPOINT
The name of the northbound Command and Control API request endpoint used by northbound applications.- See Also:
- Constant Field Values
-
NORTHBOUND_COMMAND_RESPONSE_ENDPOINT
public static final String NORTHBOUND_COMMAND_RESPONSE_ENDPOINT
The name of the northbound Command and Control API response endpoint used by northbound applications.- See Also:
- Constant Field Values
-
COMMAND_RESPONSE_REQUEST_PART
public static final String COMMAND_RESPONSE_REQUEST_PART
The part of the address for a command response between a device and an adapter, which identifies the request.- See Also:
- Constant Field Values
-
COMMAND_RESPONSE_REQUEST_PART_SHORT
public static final String COMMAND_RESPONSE_REQUEST_PART_SHORT
Short version of COMMAND_RESPONSE_REQUEST_PART.- See Also:
- Constant Field Values
-
COMMAND_RESPONSE_RESPONSE_PART
public static final String COMMAND_RESPONSE_RESPONSE_PART
The part of the address for a command response between a device and an adapter, which identifies the response.- See Also:
- Constant Field Values
-
COMMAND_RESPONSE_RESPONSE_PART_SHORT
public static final String COMMAND_RESPONSE_RESPONSE_PART_SHORT
Short version of COMMAND_RESPONSE_RESPONSE_PART.- See Also:
- Constant Field Values
-
TOPIC_POSITION_RESPONSE_STATUS
public static final int TOPIC_POSITION_RESPONSE_STATUS
Position of the status code in the MQTT command response topic.command/[tenant]/[device-id]/res/<req-id>/<status>
- See Also:
- Constant Field Values
-
TOPIC_POSITION_RESPONSE_REQ_ID
public static final int TOPIC_POSITION_RESPONSE_REQ_ID
Position of the request id in the MQTT command response topic.command/[tenant]/[device-id]/res/<req-id>/<status>
- See Also:
- Constant Field Values
-
-
Method Detail
-
isCommandEndpoint
public static final boolean isCommandEndpoint(String endpoint)
Returnstrue
if the passed endpoint denotes a command endpoint (full or short version).- Parameters:
endpoint
- The endpoint as a string.- Returns:
true
if the endpoint is a command endpoint.
-
isNorthboundCommandResponseEndpoint
public static boolean isNorthboundCommandResponseEndpoint(String endpoint)
Returnstrue
if the passed endpoint denotes a command response endpoint as used by northbound applications.- Parameters:
endpoint
- The endpoint as a string.- Returns:
true
if the endpoint is a command response endpoint.
-
-