getCommandValue method
- StringOrInt itemNameOrPosition,
- String keyValue,
- StringOrInt fieldNameOrPosition
Returns the latest value received for the specified item/key/field combination.
This method can only be used if the Subscription mode is COMMAND.
Subscriptions with two-level behavior
are also supported, hence the specified field
(see Subscription.setCommandSecondLevelFields
and Subscription.setCommandSecondLevelFieldSchema
)
can be either a first-level or a second-level one.
It is suggested to consume real-time data by implementing and adding a proper
SubscriptionListener rather than probing this method.
Note that internal data is cleared when the Subscription is unsubscribed from.
itemNameOrPosition
an item in the configured "Item List" or the 1-based position of an item within the configured "Item Group" or "Item List"keyValue
the value of a key received on the COMMAND subscription.fieldNameOrPosition
a item in the configured "Field List" or the 1-based position of a field within the configured "Field Schema" or "Field List"
Throws IllegalArgumentException if an invalid item name or field name is specified.
Throws IllegalStateException if the Subscription mode is not COMMAND.
Returns the current value for the specified field of the specified key within the specified item (possibly null), or null if the specified key has not been added yet (note that it might have been added and then deleted).
Implementation
external String? getCommandValue(StringOrInt itemNameOrPosition, String keyValue, StringOrInt fieldNameOrPosition);