public Object getValue() { /* **Codes_SRS_Property_25_004: [**The function shall return the value for this property.**]** */ return this.property.getValue(); }
/** * Getter for the context to be passed in to the message callback. * * @param inputName the inputName that the desired callback context is tied to, or null for the default callback context * * @return the message context. */ public Object getDeviceTelemetryMessageContext(String inputName) { if (inputName == null || !this.inputChannelMessageCallbacks.containsKey(inputName)) { // Codes_SRS_DEVICECLIENTCONFIG_34_011: [If the inputName is null, or the message callbacks map does not // contain the provided inputName, this function shall return the default message callback context.] return this.defaultDeviceTelemetryMessageContext; } else { // Codes_SRS_DEVICECLIENTCONFIG_34_046: [If the message callbacks map contains the provided inputName, this function // shall return the context associated with that inputName.] return this.inputChannelMessageCallbacks.get(inputName).getValue(); } }
private boolean reportPropertyCallback(Property property) { boolean reported = false; if (onDesiredPropertyChangeMap != null && onDesiredPropertyChangeMap.containsKey(property.getKey())) { Pair<PropertyCallBack<String, Object>, Object> callBackObjectPair = onDesiredPropertyChangeMap.get(property.getKey()); if (callBackObjectPair != null && callBackObjectPair.getKey() != null) { callBackObjectPair.getKey().PropertyCall(property.getKey(), property.getValue(), callBackObjectPair.getValue()); reported = true; } } if (onDesiredTwinPropertyChangeMap != null && onDesiredTwinPropertyChangeMap.containsKey(property.getKey())) { Pair<TwinPropertyCallBack, Object> callBackObjectPair = onDesiredTwinPropertyChangeMap.get(property.getKey()); if (callBackObjectPair != null && callBackObjectPair.getKey() != null) { callBackObjectPair.getKey().TwinPropertyCallBack(property, callBackObjectPair.getValue()); reported = true; } } return reported; }