azure-docs-sdk-java/docs-ref-autogen/com.microsoft.azure.sdk.iot...

179 строки
14 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.sdk.iot.device.DeviceIO"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO"
name: "DeviceIO"
nameWithType: "DeviceIO"
summary: "The task scheduler for sending and receiving messages for the Device Client"
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
methodsRef:
- "<xref href=\"java.lang.Object.clone()?alt=java.lang.Object.clone&text=clone\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.equals(java.lang.Object)?alt=java.lang.Object.equals&text=equals\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.finalize()?alt=java.lang.Object.finalize&text=finalize\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.getClass()?alt=java.lang.Object.getClass&text=getClass\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.hashCode()?alt=java.lang.Object.hashCode&text=hashCode\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notify()?alt=java.lang.Object.notify&text=notify\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notifyAll()?alt=java.lang.Object.notifyAll&text=notifyAll\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.toString()?alt=java.lang.Object.toString&text=toString\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait()?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long,int)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final class **DeviceIO**</br> implements <xref href=\"com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback?alt=com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback&text=IotHubConnectionStatusChangeCallback\" data-throw-if-not-resolved=\"False\" />"
methods:
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.close()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.close()"
name: "close()"
nameWithType: "DeviceIO.close()"
summary: "Completes all current outstanding requests and closes the IoT Hub client."
syntax: "public void close()"
exceptions:
- description: "if the connection to an IoT Hub cannot be closed."
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Completes all current outstanding requests and closes the IoT Hub client. Must be called to terminate the background thread that is sending data to IoT Hub. After `close()` is called, the IoT Hub client is no longer usable. If the client is already closed, the function shall do nothing."
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.closeWithoutWrappingException()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.closeWithoutWrappingException()"
name: "closeWithoutWrappingException()"
nameWithType: "DeviceIO.closeWithoutWrappingException()"
syntax: "public void closeWithoutWrappingException()"
exceptions:
- type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.TransportException?alt=com.microsoft.azure.sdk.iot.device.exceptions.TransportException&text=TransportException\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.execute(com.microsoft.azure.sdk.iot.device.transport.IotHubConnectionStatus,com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeReason,java.lang.Throwable,java.lang.Object)"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.execute(IotHubConnectionStatus status, IotHubConnectionStatusChangeReason statusChangeReason, Throwable throwable, Object callbackContext)"
name: "execute(IotHubConnectionStatus status, IotHubConnectionStatusChangeReason statusChangeReason, Throwable throwable, Object callbackContext)"
nameWithType: "DeviceIO.execute(IotHubConnectionStatus status, IotHubConnectionStatusChangeReason statusChangeReason, Throwable throwable, Object callbackContext)"
summary: "Callback that is executed when the connection status of this sdk to the iot hub changes."
parameters:
- name: "status"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.transport.IotHubConnectionStatus?alt=com.microsoft.azure.sdk.iot.device.transport.IotHubConnectionStatus&text=IotHubConnectionStatus\" data-throw-if-not-resolved=\"False\" />"
- name: "statusChangeReason"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeReason?alt=com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeReason&text=IotHubConnectionStatusChangeReason\" data-throw-if-not-resolved=\"False\" />"
- name: "throwable"
type: "<xref href=\"java.lang.Throwable?alt=java.lang.Throwable&text=Throwable\" data-throw-if-not-resolved=\"False\" />"
- name: "callbackContext"
type: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void execute(IotHubConnectionStatus status, IotHubConnectionStatusChangeReason statusChangeReason, Throwable throwable, Object callbackContext)"
desc: "Callback that is executed when the connection status of this sdk to the iot hub changes. Includes details for more context on why that change occurred."
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.getProtocol()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.getProtocol()"
name: "getProtocol()"
nameWithType: "DeviceIO.getProtocol()"
summary: "Getter for the transport protocol."
syntax: "public IotHubClientProtocol getProtocol()"
desc: "Getter for the transport protocol."
returns:
description: "a protocol for transport."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.IotHubClientProtocol?alt=com.microsoft.azure.sdk.iot.device.IotHubClientProtocol&text=IotHubClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.getReceivePeriodInMilliseconds()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.getReceivePeriodInMilliseconds()"
name: "getReceivePeriodInMilliseconds()"
nameWithType: "DeviceIO.getReceivePeriodInMilliseconds()"
summary: "Getter for the receive period in milliseconds."
syntax: "public long getReceivePeriodInMilliseconds()"
desc: "Getter for the receive period in milliseconds."
returns:
description: "a long with the number of milliseconds between receives."
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.getSendPeriodInMilliseconds()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.getSendPeriodInMilliseconds()"
name: "getSendPeriodInMilliseconds()"
nameWithType: "DeviceIO.getSendPeriodInMilliseconds()"
summary: "Getter for the send period in milliseconds."
syntax: "public long getSendPeriodInMilliseconds()"
desc: "Getter for the send period in milliseconds."
returns:
description: "a long with the number of milliseconds between sends."
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.isEmpty()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.isEmpty()"
name: "isEmpty()"
nameWithType: "DeviceIO.isEmpty()"
summary: "Getter for the transport empty queue."
syntax: "public boolean isEmpty()"
desc: "Getter for the transport empty queue."
returns:
description: "a boolean true if the transport queue is empty, or false if there is messages to send."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.isOpen()"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.isOpen()"
name: "isOpen()"
nameWithType: "DeviceIO.isOpen()"
summary: "Getter for the connection state."
syntax: "public boolean isOpen()"
desc: "Getter for the connection state."
returns:
description: "a boolean true if the connection is open or reconnecting, and false otherwise."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.registerConnectionStateCallback(com.microsoft.azure.sdk.iot.device.IotHubConnectionStateCallback,java.lang.Object)"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.registerConnectionStateCallback(IotHubConnectionStateCallback callback, Object callbackContext)"
name: "registerConnectionStateCallback(IotHubConnectionStateCallback callback, Object callbackContext)"
nameWithType: "DeviceIO.registerConnectionStateCallback(IotHubConnectionStateCallback callback, Object callbackContext)"
summary: "Registers a callback with the configured transport to be executed whenever the connection to the device is lost or established."
parameters:
- description: "the callback to be called."
name: "callback"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.IotHubConnectionStateCallback?alt=com.microsoft.azure.sdk.iot.device.IotHubConnectionStateCallback&text=IotHubConnectionStateCallback\" data-throw-if-not-resolved=\"False\" />"
- description: "a context to be passed to the callback. Can be\n <code>null</code> if no callback is provided."
name: "callbackContext"
type: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void registerConnectionStateCallback(IotHubConnectionStateCallback callback, Object callbackContext)"
desc: "Registers a callback with the configured transport to be executed whenever the connection to the device is lost or established."
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.sendEventAsync(com.microsoft.azure.sdk.iot.device.Message,com.microsoft.azure.sdk.iot.device.IotHubEventCallback,java.lang.Object,java.lang.String)"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.sendEventAsync(Message message, IotHubEventCallback callback, Object callbackContext, String deviceId)"
name: "sendEventAsync(Message message, IotHubEventCallback callback, Object callbackContext, String deviceId)"
nameWithType: "DeviceIO.sendEventAsync(Message message, IotHubEventCallback callback, Object callbackContext, String deviceId)"
summary: "Asynchronously sends an event message to the IoT Hub."
modifiers:
- "synchronized"
parameters:
- description: "the message to be sent."
name: "message"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.Message?alt=com.microsoft.azure.sdk.iot.device.Message&text=Message\" data-throw-if-not-resolved=\"False\" />"
- description: "the callback to be invoked when a response is received.\n Can be <code>null</code>."
name: "callback"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.IotHubEventCallback?alt=com.microsoft.azure.sdk.iot.device.IotHubEventCallback&text=IotHubEventCallback\" data-throw-if-not-resolved=\"False\" />"
- description: "a context to be passed to the callback. Can be\n <code>null</code> if no callback is provided."
name: "callbackContext"
type: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
- description: "the id of the device sending the message"
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public synchronized void sendEventAsync(Message message, IotHubEventCallback callback, Object callbackContext, String deviceId)"
desc: "Asynchronously sends an event message to the IoT Hub."
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.setReceivePeriodInMilliseconds(long)"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.setReceivePeriodInMilliseconds(long newIntervalInMilliseconds)"
name: "setReceivePeriodInMilliseconds(long newIntervalInMilliseconds)"
nameWithType: "DeviceIO.setReceivePeriodInMilliseconds(long newIntervalInMilliseconds)"
summary: "Setter for the receive period in milliseconds."
parameters:
- description: "is the new interval in milliseconds."
name: "newIntervalInMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setReceivePeriodInMilliseconds(long newIntervalInMilliseconds)"
exceptions:
- description: "if the task schedule exist but there is no receive task function to call."
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Setter for the receive period in milliseconds."
- uid: "com.microsoft.azure.sdk.iot.device.DeviceIO.setSendPeriodInMilliseconds(long)"
fullName: "com.microsoft.azure.sdk.iot.device.DeviceIO.setSendPeriodInMilliseconds(long newIntervalInMilliseconds)"
name: "setSendPeriodInMilliseconds(long newIntervalInMilliseconds)"
nameWithType: "DeviceIO.setSendPeriodInMilliseconds(long newIntervalInMilliseconds)"
summary: "Setter for the send period in milliseconds."
parameters:
- description: "is the new interval in milliseconds."
name: "newIntervalInMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setSendPeriodInMilliseconds(long newIntervalInMilliseconds)"
exceptions:
- description: "if the task schedule exist but there is no send task function to call."
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Setter for the send period in milliseconds."
type: "class"
desc: "The task scheduler for sending and receiving messages for the Device Client"
implements:
- "<xref href=\"com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback?alt=com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback&text=IotHubConnectionStatusChangeCallback\" data-throw-if-not-resolved=\"False\" />"
metadata: {}
package: "com.microsoft.azure.sdk.iot.device"
artifact: com.microsoft.azure.sdk.iot:iot-device-client:1.30.1