MessageProperty Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.device.MessageProperty

public final class MessageProperty

An IoT Hub message property.

Field Summary

Modifier and Type Field and Description
static final java.lang.String CONNECTION_DEVICE_ID
static final java.lang.String CONNECTION_MODULE_ID
static final java.lang.String IOTHUB_CONTENT_ENCODING
static final java.lang.String IOTHUB_CONTENT_TYPE
static final java.lang.String IOTHUB_CREATION_TIME_UTC
static final java.lang.String IOTHUB_SECURITY_INTERFACE_ID
static final java.lang.String IOTHUB_SECURITY_INTERFACE_ID_VALUE
static final java.lang.String OUTPUT_NAME_PROPERTY
static final java.util.Set<java.lang.String> RESERVED_PROPERTY_NAMES

A set of reserved property names.

Constructor Summary

Modifier Constructor Description
protected MessageProperty()
MessageProperty(String name, String value)

Constructor.

Method Summary

Modifier and Type Method and Description
java.lang.String getName()

Returns the property name.

java.lang.String getValue()

Returns the property value.

boolean hasSameName(String name)

Equivalent to property.getName().equalsIgnoreCase(name).

static boolean isValidAppProperty(String name, String value)

Returns whether the property is a valid application property.

static boolean isValidSystemProperty(String name, String value)

Returns whether the property is a valid system property.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

CONNECTION_DEVICE_ID

public static final String CONNECTION_DEVICE_ID

CONNECTION_MODULE_ID

public static final String CONNECTION_MODULE_ID

IOTHUB_CONTENT_ENCODING

public static final String IOTHUB_CONTENT_ENCODING

IOTHUB_CONTENT_TYPE

public static final String IOTHUB_CONTENT_TYPE

IOTHUB_CREATION_TIME_UTC

public static final String IOTHUB_CREATION_TIME_UTC

IOTHUB_SECURITY_INTERFACE_ID

public static final String IOTHUB_SECURITY_INTERFACE_ID

IOTHUB_SECURITY_INTERFACE_ID_VALUE

public static final String IOTHUB_SECURITY_INTERFACE_ID_VALUE

OUTPUT_NAME_PROPERTY

public static final String OUTPUT_NAME_PROPERTY

RESERVED_PROPERTY_NAMES

public static final Set 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 Details

MessageProperty

protected MessageProperty()

MessageProperty

public MessageProperty(String name, String value)

Constructor.

Parameters:

name - The IoT Hub message property name.
value - The IoT Hub message property value.

Method Details

getName

public String getName()

Returns the property name.

Returns:

the property name.

getValue

public String getValue()

Returns the property value.

Returns:

the property value.

hasSameName

public boolean hasSameName(String name)

Equivalent to property.getName().equalsIgnoreCase(name).

Parameters:

name - the property name.

Returns:

true if the given name is the property name.

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:

name - the property name.
value - the property value.

Returns:

whether the property is a valid application property.

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:

name - the property name.
value - the property value.

Returns:

whether the property is a valid system property.

Applies to