MessageProperty Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. device. MessageProperty
- com.
public class MessageProperty
An IoT Hub message property.
Field Summary
Modifier and Type | Field and Description |
---|---|
final String | COMPONENT_ID |
final String | CONNECTION_DEVICE_ID |
final String | CONNECTION_MODULE_ID |
final String | IOTHUB_CONTENT_ENCODING |
final String | IOTHUB_CONTENT_TYPE |
final String | IOTHUB_CREATION_TIME_UTC |
final String | IOTHUB_SECURITY_INTERFACE_ID |
final String | IOTHUB_SECURITY_INTERFACE_ID_VALUE |
final String | OUTPUT_NAME_PROPERTY |
final Set<String> |
RESERVED_PROPERTY_NAMES
A set of reserved property names. The reserved property names are interpreted in a meaningful way by the device and the IoT Hub. |
Constructor Summary
Constructor | Description | |
---|---|---|
MessageProperty() | ||
MessageProperty(String name, String value) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the property name. |
String |
getValue()
Returns the property value. |
boolean |
hasSameName(String name)
Equivalent to property.getName().equalsIgnoreCase(name). |
boolean |
isValidAppProperty(String name, String value)
Returns whether the property is a valid application property. The property is valid if it is not one of the reserved properties, only uses US-ASCII |
boolean |
isValidSystemProperty(String name, String value)
Returns whether the property is a valid system property. The property is valid if it is one of the reserved properties and only uses US-ASCII |
Field Details
COMPONENT_ID
public static final String COMPONENT_ID= "dt-subject"
CONNECTION_DEVICE_ID
public static final String CONNECTION_DEVICE_ID= "iothub-connection-device-id"
CONNECTION_MODULE_ID
public static final String CONNECTION_MODULE_ID= "iothub-connection-module-id"
IOTHUB_CONTENT_ENCODING
public static final String IOTHUB_CONTENT_ENCODING= "iothub-contentencoding"
IOTHUB_CONTENT_TYPE
public static final String IOTHUB_CONTENT_TYPE= "iothub-contenttype"
IOTHUB_CREATION_TIME_UTC
public static final String IOTHUB_CREATION_TIME_UTC= "iothub-creation-time-utc"
IOTHUB_SECURITY_INTERFACE_ID
public static final String IOTHUB_SECURITY_INTERFACE_ID= "iothub-interface-id"
IOTHUB_SECURITY_INTERFACE_ID_VALUE
public static final String IOTHUB_SECURITY_INTERFACE_ID_VALUE= "urn:azureiot:Security:SecurityAgent:1"
OUTPUT_NAME_PROPERTY
public static final String OUTPUT_NAME_PROPERTY= "iothub-outputname"
RESERVED_PROPERTY_NAMES
public static final Set
A set of reserved property names. The reserved property names are interpreted in a meaningful way by the device and the IoT Hub.
Constructor Details
MessageProperty
protected MessageProperty()
MessageProperty
public MessageProperty(String name, String value)
Constructor.
Parameters:
Throws:
Method Details
getName
public String getName()
Returns the property name.
Returns:
getValue
public String getValue()
Returns the property value.
Returns:
hasSameName
public boolean hasSameName(String name)
Equivalent to property.getName().equalsIgnoreCase(name).
Parameters:
Returns:
isValidAppProperty
public static boolean isValidAppProperty(String name, String value)
Returns whether the property is a valid application property. The property is valid if it is not one of the reserved properties, only uses US-ASCII
Parameters:
Returns:
isValidSystemProperty
public static boolean isValidSystemProperty(String name, String value)
Returns whether the property is a valid system property. The property is valid if it is one of the reserved properties and only uses US-ASCII
Parameters:
Returns:
Applies to
Azure SDK for Java