DeviceTwin Class
- java.
lang. Object - MessageCallback
- com.
microsoft. azure. sdk. iot. device. twin. DeviceTwin
- com.
public class DeviceTwin implements MessageCallback
Constructor Summary
Constructor | Description | |
---|---|---|
DeviceTwin(InternalClient client) |
Method Summary
Constructor Details
DeviceTwin
public DeviceTwin(InternalClient client)
Parameters:
Method Details
getTwinAsync
public void getTwinAsync(GetTwinCorrelatingMessageCallback twinCallback, Object callbackContext)
Parameters:
onCloudToDeviceMessageReceived
public IotHubMessageResult onCloudToDeviceMessageReceived(Message message, Object callbackContext)
Executes the callback. The callback should return a response that instructs an IoT Hub to COMPLETE, ABANDON, or REJECT the message.
If this callback throws an exception it will not complete the message and can cause the messages to build up on the IoT hub until they expire. This can prevent further message delivery until all messages are expired or completed from IoT hub.
Overrides:
DeviceTwin.onCloudToDeviceMessageReceived(Message message, Object callbackContext)Parameters:
Returns:
subscribeToDesiredPropertiesAsync
public void subscribeToDesiredPropertiesAsync(SubscriptionAcknowledgedCallback subscriptionAcknowledgedCallback, Object subscribeToDesiredPropertiesCallbackContext, DesiredPropertiesCallback desiredPropertiesCallback, Object desiredPropertiesUpdateCallbackContext)
Parameters:
updateReportedPropertiesAsync
public void updateReportedPropertiesAsync(TwinCollection reportedProperties, ReportedPropertiesUpdateCorrelatingMessageCallback reportedPropertiesUpdateCorrelatingMessageCallback, Object callbackContext)
Parameters:
Applies to
Azure SDK for Java