ServiceClient Class

Definition

Extend the ServiceClient class and provide AMPQ specific implementation.

public class ServiceClient
Inheritance
java.lang.Object
ServiceClient

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)

Constructors

ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)

Initialize AMQP sender using given connection string

ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)

Initialize AMQP sender using given connection string

ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol)

Create a ServiceClient instance with an instance of AzureSasCredential.

ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)

Create a ServiceClient instance with an instance of AzureSasCredential.

ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol)

Create a ServiceClient instance with a custom TokenCredential to allow for finer grain control of authentication tokens used in the underlying connection.

ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)

Create a ServiceClient instance with a custom TokenCredential to allow for finer grain control of authentication tokens used in the underlying connection.

ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)

Create ServiceClient from the specified connection string

ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)

Create ServiceClient from the specified connection string

Methods

close()

Close AMQP sender

closeAsync()

Provide asynchronous access to close()

createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)

Create ServiceClient from the specified connection string

createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)

Create ServiceClient from the specified connection string

getFeedbackReceiver()

Instantiate a new FeedbackReceiver object.

getFeedbackReceiver(String deviceId)

Get FeedbackReceiver object.This API has been deprecated. Use new API without deviceId as an input parameter.

getFileUploadNotificationReceiver()

Instantiate a new FileUploadNotificationReceiver object.

open()

Open AMQP sender

openAsync()

Provide asynchronous access to open()

send(String deviceId, Message message)

Send a one-way message to the specified device. This function is synchronized internally so that only one send operation is allowed at a time. In order to do more send operations at a time, you will need to instantiate another service client instance.

send(String deviceId, String moduleId, Message message)

Send a one-way message to the specified module. This function is synchronized internally so that only one send operation is allowed at a time. In order to do more send operations at a time, you will need to instantiate another service client instance.

sendAsync(String deviceId, Message message)

Provide asynchronous access to send()

Applies to