public final class MessageProperty extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
The property name.
|
static Set<String> |
RESERVED_PROPERTY_NAMES
A set of reserved property names.
|
protected String |
value
The property value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MessageProperty() |
|
MessageProperty(String name,
String value)
Constructor.
|
| 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).
|
static boolean |
isValidAppProperty(String name,
String value)
Returns whether the property is a valid application property.
|
protected static boolean |
usesValidChars(String s)
Returns true if the string only uses US-ASCII printable chars and does
not contain:
()<>@,;:\"/[]?={} (space) (horizontal tab) |
public static final Set<String> RESERVED_PROPERTY_NAMES
protected final String name
protected final String value
public MessageProperty(String name, String value)
name - The IoT Hub message property name.value - The IoT Hub message property value.IllegalArgumentException - if the name and value constitute an
invalid IoT Hub message property. A message property can only contain
US-ASCII printable chars, with some exceptions as specified in RFC 2047.
A message property name cannot be one of the reserved property names.protected MessageProperty()
public String getName()
public String getValue()
public boolean hasSameName(String name)
name - the property name.public static boolean isValidAppProperty(String name, String value)
()<>@,;:\"/[]?={} (space)
(horizontal tab).name - the property name.value - the property value.protected static boolean usesValidChars(String s)
()<>@,;:\"/[]?={} (space) (horizontal tab)s - the string.()<>@,;:\"/[]?={} (space) (horizontal tab)Copyright © 2017. All rights reserved.