com.microsoft.azure.sdk.iot.device

Definition

The API for a device to communicate with an IoT Hub.

Classes

BatchMessage

Used to construct batch messages to be sent to the IoT Hub sendEventBatchAsync

ClientOptions

Options that allow configuration of the device client instance during initialization.

CustomLogger

Deprecated as of Device client version 1.18.0, sdk now calls SLF4J directly instead and will not be replacing this class with anything

DeviceClient

The public-facing API. Allows a single logical or physical device to connect to an IoT Hub. The IoT Hub client supports sending events to and receiving messages from an IoT Hub.

To support these workflows, the client library will provide the following abstractions: a message, with its payload and associated properties; and a client, which sends and receives messages.

The client buffers messages while the network is down, and re-sends them when the network comes back online. It also batches messages to improve communication efficiency (HTTPS only).

The client supports HTTPS 1.1 and AMQPS 1.0 transports.

DeviceClientConfig

Configuration settings for an IoT Hub client. Validates all user-defined settings.

DeviceIO

The task scheduler for sending and receiving messages for the Device Client

InternalClient
IotHubConnectionString

Parser for the Iothub connection string.

Message
MessageProperty

An IoT Hub message property.

ModuleClient

Public API for communicating from Edge Modules. A ModuleClient can be used to send messages from an Edge module to an EdgeHub or an IotHub. It can also send twin updates and listen for method calls from an EdgeHub or IotHub as well

MultiplexingClient

A client for creating multiplexed connections to IoT Hub. A multiplexed connection allows for multiple device clients to communicate to the service through a single AMQPS connection.

A given AMQPS connection requires a TLS connection, so multiplexing may be worthwhile if you want to limit the number of TLS connections needed to connect multiple device clients to IoT Hub.

A given multiplexing client also has a fixed amount of worker threads regardless of how many device clients are being multiplexed. Comparatively, every non-multiplexed device client instance has its own set of worker threads. Multiplexing may be worthwhile if you want fewer worker threads.

Only AMQPS and AMQPS_WS support multiplexing, and only symmetric key authenticated devices can be multiplexed.

ModuleClient instances cannot be multiplexed.

MultiplexingClientOptions

The optional settings for creating a MultiplexingClient. If set, these values will supersede any device client level settings on these parameters.

ObjectLock

This class enables mocking of the base class wait and notify functions

ProductInfo

Represents the complete user agent string to be included in all D2C communication.

ProxySettings
ReportedPropertiesParameters

Convenience class for the sendReportedProperties method in the DeviceClient

ResponseMessage

Extend Message to support status response

TransportClient

The public-facing API. Allows user to create a transport client abstracton object to use it for multiple devices to connect to an IoT Hub using the same connection (multiplexing). Handle to register devices to transport client and open / closeNow the connection.

The multiplexed connection is supported with AMQPS / AMQPS_WS protocols.

Interfaces

CorrelatingMessageCallback

This interface has a number of call backs to notify when a message is in a specific part of the IotHubTransport lifecycle.

There is no default implementation of this interface and will be up to the developer to implement.

An example of this implementation and usage can be found in the DeviceTwinSample.

IotHubConnectionStateCallback

An interface for an IoT Hub connection state callback. Developers are expected to create an implementation of this interface, and the transport will call execute(IotHubConnectionState state, Object callbackContext) passing in the connection status (down, success, etc.).

IotHubConnectionStatusChangeCallback

Callback interface for allowing users to respond to changes in the connectivity of this sdk to Iot Hub.

IotHubEventCallback

An interface for an IoT Hub event callback. Developers are expected to create an implementation of this interface, and the transport will call execute(IotHubStatusCode responseStatus, Object callbackContext) upon receiving a response from an IoT Hub.

IotHubResponseCallback

An interface for an IoT Hub response callback. Developers are expected to create an implementation of this interface, and the transport will call execute(ResponseMessage responseMessage, Object callbackContext) upon receiving a response from an IoT Hub.

MessageCallback

An interface for an IoT Hub message callback.

The developer is expected to create an implementation of this interface, and the transport will call execute(Message message, Object callbackContext) upon receiving a message from an IoT Hub.

SasTokenProvider

Interface for allowing users to control SAS token generation. To see an example of how SAS tokens can be generated from device connection strings, see IotHubSasToken.

Enums

DeviceClientConfig.AuthType
FeedbackStatusCodeEnum
IotHubClientProtocol

The application-layer protocol used by the client to communicate with an IoT Hub.

IotHubConnectionState

The IoT Hub connection state value.

IotHubConnectionStatusChangeReason
IotHubMessageResult

A return value from a message callback that instructs an IoT Hub to complete, abandon, or reject the message.

IotHubMethod

Generic IoT Hub Method.

IotHubStatusCode

An IoT Hub status code. Included in a message from an IoT Hub to a device.

MessageType

The IoTHub message type

TransportClient.TransportClientState