public final class DirectMethod
extends java.lang.Object
| Constructor and Description |
|---|
DirectMethod(InternalClient client,
SubscriptionAcknowledgedCallback deviceMethodStatusCallback,
java.lang.Object deviceMethodStatusCallbackContext)
This constructor creates an instance of device method class which helps facilitate the interation for device methods
between the user and IotHub.
|
| Modifier and Type | Method and Description |
|---|---|
void |
subscribeToDirectMethods(MethodCallback methodCallback,
java.lang.Object deviceMethodCallbackContext)
A method which subscribes to receive device method invocation for the user with the IotHub.
|
public DirectMethod(InternalClient client, SubscriptionAcknowledgedCallback deviceMethodStatusCallback, java.lang.Object deviceMethodStatusCallbackContext) throws java.lang.IllegalArgumentException
deviceMethodStatusCallback - Callback to provide status for device method state with IotHub. Cannot be null.deviceMethodStatusCallbackContext - Context to be passed when device method status is invoked. Can be nullclient - Device client object for this connection instance for the device. Cannot be nulljava.lang.IllegalArgumentException - This exception is thrown if either deviceIO or config or deviceMethodStatusCallback are nullpublic void subscribeToDirectMethods(MethodCallback methodCallback, java.lang.Object deviceMethodCallbackContext) throws java.lang.IllegalArgumentException
methodCallback - Callback where upon receiving the request the
invoke a method shall be triggered.deviceMethodCallbackContext - Context to be passed on when invoking the
callback.java.lang.IllegalArgumentException - This exception is thrown when methodCallback is provided null.Copyright © 2023. All rights reserved.