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

356 строки
35 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.sdk.iot.service.ServiceClient"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient"
name: "ServiceClient"
nameWithType: "ServiceClient"
summary: "Extend the Service<wbr>Client class and provide AMPQ specific implementation."
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 class **ServiceClient**"
constructors:
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(com.microsoft.azure.sdk.iot.service.IotHubConnectionString,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
name: "ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
nameWithType: "ServiceClient.ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
summary: "Initialize AMQP sender using given connection string"
modifiers:
- "protected"
parameters:
- description: "The ConnectionString object for the IotHub"
name: "iotHubConnectionString"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubConnectionString?alt=com.microsoft.azure.sdk.iot.service.IotHubConnectionString&text=IotHubConnectionString\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
desc: "Initialize AMQP sender using given connection string"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(com.microsoft.azure.sdk.iot.service.IotHubConnectionString,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
name: "ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
nameWithType: "ServiceClient.ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
summary: "Initialize AMQP sender using given connection string"
modifiers:
- "protected"
parameters:
- description: "The ConnectionString object for the IotHub"
name: "iotHubConnectionString"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubConnectionString?alt=com.microsoft.azure.sdk.iot.service.IotHubConnectionString&text=IotHubConnectionString\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- description: "options for proxy"
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClientOptions?alt=com.microsoft.azure.sdk.iot.service.ServiceClientOptions&text=ServiceClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected ServiceClient(IotHubConnectionString iotHubConnectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
desc: "Initialize AMQP sender using given connection string"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.azure.core.credential.AzureSasCredential,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
name: "ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
nameWithType: "ServiceClient.ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
summary: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with an instance of <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureSasCredential\"></xref>."
parameters:
- description: "The hostname of your IoT Hub instance (For instance, \"your-iot-hub.azure-devices.net\")"
name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The SAS token provider that will be used for authentication."
name: "azureSasCredential"
type: "<xref href=\"com.azure.core.credential.AzureSasCredential?alt=com.azure.core.credential.AzureSasCredential&text=AzureSasCredential\" data-throw-if-not-resolved=\"False\" />"
- description: "The protocol to open the connection with."
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
desc: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with an instance of <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureSasCredential\"></xref>."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.azure.core.credential.AzureSasCredential,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
name: "ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
nameWithType: "ServiceClient.ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
summary: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with an instance of <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureSasCredential\"></xref>."
parameters:
- description: "The hostname of your IoT Hub instance (For instance, \"your-iot-hub.azure-devices.net\")"
name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The SAS token provider that will be used for authentication."
name: "azureSasCredential"
type: "<xref href=\"com.azure.core.credential.AzureSasCredential?alt=com.azure.core.credential.AzureSasCredential&text=AzureSasCredential\" data-throw-if-not-resolved=\"False\" />"
- description: "The protocol to open the connection with."
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- description: "The connection options to use when connecting to the service."
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClientOptions?alt=com.microsoft.azure.sdk.iot.service.ServiceClientOptions&text=ServiceClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
desc: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with an instance of <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureSasCredential\"></xref>."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.azure.core.credential.TokenCredential,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
name: "ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
nameWithType: "ServiceClient.ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
summary: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with a custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> to allow for finer grain control of authentication tokens used in the underlying connection."
parameters:
- description: "The hostname of your IoT Hub instance (For instance, \"your-iot-hub.azure-devices.net\")"
name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> that will provide authentication tokens to\n this library when they are needed. The provided tokens must be Json Web Tokens."
name: "credential"
type: "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
- description: "The protocol to open the connection with."
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
desc: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with a custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> to allow for finer grain control of authentication tokens used in the underlying connection."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.azure.core.credential.TokenCredential,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
name: "ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
nameWithType: "ServiceClient.ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
summary: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with a custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> to allow for finer grain control of authentication tokens used in the underlying connection."
parameters:
- description: "The hostname of your IoT Hub instance (For instance, \"your-iot-hub.azure-devices.net\")"
name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> that will provide authentication tokens to\n this library when they are needed. The provided tokens must be Json Web Tokens."
name: "credential"
type: "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
- description: "The protocol to open the connection with."
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- description: "The connection options to use when connecting to the service."
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClientOptions?alt=com.microsoft.azure.sdk.iot.service.ServiceClientOptions&text=ServiceClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
desc: "Create a <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceClient\"></xref> instance with a custom <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> to allow for finer grain control of authentication tokens used in the underlying connection."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
name: "ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
nameWithType: "ServiceClient.ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
summary: "Create Service<wbr>Client from the specified connection string"
parameters:
- description: "The connection string for the IotHub"
name: "connectionString"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
desc: "Create ServiceClient from the specified connection string"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
name: "ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
nameWithType: "ServiceClient.ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
summary: "Create Service<wbr>Client from the specified connection string"
parameters:
- description: "The connection string for the IotHub"
name: "connectionString"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- description: "The connection options to use when connecting to the service."
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClientOptions?alt=com.microsoft.azure.sdk.iot.service.ServiceClientOptions&text=ServiceClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceClient(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
desc: "Create ServiceClient from the specified connection string"
methods:
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.close()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.close()"
name: "close()"
nameWithType: "ServiceClient.close()"
summary: "Close AMQP sender"
syntax: "public void close()"
exceptions:
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Close AMQP sender"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.closeAsync()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.closeAsync()"
name: "closeAsync()"
nameWithType: "ServiceClient.closeAsync()"
summary: "Provide asynchronous access to close()"
syntax: "public CompletableFuture<Void> closeAsync()"
desc: "Provide asynchronous access to close()"
returns:
description: "The future object for the requested operation"
type: "<xref href=\"java.util.concurrent.CompletableFuture?alt=java.util.concurrent.CompletableFuture&text=CompletableFuture\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.Void?alt=java.lang.Void&text=Void\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.createFromConnectionString(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
name: "createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
nameWithType: "ServiceClient.createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
summary: "Create Service<wbr>Client from the specified connection string"
deprecatedTag: "because this method declares a thrown IOException even though it never throws an IOException. Users are recommended to use <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#ServiceClient(String, IotHubServiceClientProtocol)\"></xref> instead since it does not declare this exception even though it constructs the same Service<wbr>Client."
modifiers:
- "static"
parameters:
- description: "The connection string for the IotHub"
name: "connectionString"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
syntax: "</br>public static ServiceClient createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol)"
exceptions:
- description: "This exception is thrown if the object creation failed"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create ServiceClient from the specified connection string"
hasDeprecatedTag: true
returns:
description: "The created ServiceClient object"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClient?alt=com.microsoft.azure.sdk.iot.service.ServiceClient&text=ServiceClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.createFromConnectionString(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
name: "createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
nameWithType: "ServiceClient.createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
summary: "Create Service<wbr>Client from the specified connection string"
deprecatedTag: "because this method declares a thrown IOException even though it never throws an IOException. Users are recommended to use <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient.ServiceClient(java.lang.String,com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol,com.microsoft.azure.sdk.iot.service.ServiceClientOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#ServiceClient(String, IotHubServiceClientProtocol, ServiceClientOptions)\"></xref> instead since it does not declare this exception even though it constructs the same Service<wbr>Client."
modifiers:
- "static"
parameters:
- description: "The connection string for the IotHub"
name: "connectionString"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "protocol to use"
name: "iotHubServiceClientProtocol"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol?alt=com.microsoft.azure.sdk.iot.service.IotHubServiceClientProtocol&text=IotHubServiceClientProtocol\" data-throw-if-not-resolved=\"False\" />"
- description: "The connection options to use when connecting to the service."
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClientOptions?alt=com.microsoft.azure.sdk.iot.service.ServiceClientOptions&text=ServiceClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "</br>public static ServiceClient createFromConnectionString(String connectionString, IotHubServiceClientProtocol iotHubServiceClientProtocol, ServiceClientOptions options)"
exceptions:
- description: "This exception is thrown if the object creation failed"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create ServiceClient from the specified connection string"
hasDeprecatedTag: true
returns:
description: "The created ServiceClient object"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.ServiceClient?alt=com.microsoft.azure.sdk.iot.service.ServiceClient&text=ServiceClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFeedbackReceiver()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFeedbackReceiver()"
name: "getFeedbackReceiver()"
nameWithType: "ServiceClient.getFeedbackReceiver()"
summary: "Instantiate a new Feedback<wbr>Receiver object."
syntax: "public FeedbackReceiver getFeedbackReceiver()"
desc: "Instantiate a new FeedbackReceiver object."
returns:
description: "The instance of the FeedbackReceiver"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.FeedbackReceiver?alt=com.microsoft.azure.sdk.iot.service.FeedbackReceiver&text=FeedbackReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFeedbackReceiver(java.lang.String)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFeedbackReceiver(String deviceId)"
name: "getFeedbackReceiver(String deviceId)"
nameWithType: "ServiceClient.getFeedbackReceiver(String deviceId)"
summary: "Get Feedback<wbr>Receiver object.<wbr>This API has been deprecated."
deprecatedTag: "As of release 1.1.15, replaced by <xref uid=\"com.microsoft.azure.sdk.iot.service.ServiceClient.getFeedbackReceiver()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getFeedbackReceiver()\"></xref>"
parameters:
- description: "The device identifier for the target device"
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "</br>public FeedbackReceiver getFeedbackReceiver(String deviceId)"
desc: "Get FeedbackReceiver object.This API has been deprecated. Use new API without deviceId as an input parameter."
hasDeprecatedTag: true
returns:
description: "The instance of the FeedbackReceiver"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.FeedbackReceiver?alt=com.microsoft.azure.sdk.iot.service.FeedbackReceiver&text=FeedbackReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFileUploadNotificationReceiver()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.getFileUploadNotificationReceiver()"
name: "getFileUploadNotificationReceiver()"
nameWithType: "ServiceClient.getFileUploadNotificationReceiver()"
summary: "Instantiate a new File<wbr>Upload<wbr>Notification<wbr>Receiver object."
syntax: "public FileUploadNotificationReceiver getFileUploadNotificationReceiver()"
desc: "Instantiate a new FileUploadNotificationReceiver object."
returns:
description: "The instance of the FileUploadNotificationReceiver"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.FileUploadNotificationReceiver?alt=com.microsoft.azure.sdk.iot.service.FileUploadNotificationReceiver&text=FileUploadNotificationReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.open()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.open()"
name: "open()"
nameWithType: "ServiceClient.open()"
summary: "Open AMQP sender"
syntax: "public void open()"
exceptions:
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
desc: "Open AMQP sender"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.openAsync()"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.openAsync()"
name: "openAsync()"
nameWithType: "ServiceClient.openAsync()"
summary: "Provide asynchronous access to open()"
syntax: "public CompletableFuture<Void> openAsync()"
desc: "Provide asynchronous access to open()"
returns:
description: "The future object for the requested operation"
type: "<xref href=\"java.util.concurrent.CompletableFuture?alt=java.util.concurrent.CompletableFuture&text=CompletableFuture\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.Void?alt=java.lang.Void&text=Void\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.send(java.lang.String,com.microsoft.azure.sdk.iot.service.Message)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.send(String deviceId, Message message)"
name: "send(String deviceId, Message message)"
nameWithType: "ServiceClient.send(String deviceId, Message message)"
summary: "Send a one-way message to the specified device."
parameters:
- description: "The device identifier for the target device"
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The message for the device"
name: "message"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.Message?alt=com.microsoft.azure.sdk.iot.service.Message&text=Message\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void send(String deviceId, Message message)"
exceptions:
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.exceptions.IotHubException?alt=com.microsoft.azure.sdk.iot.service.exceptions.IotHubException&text=IotHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "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."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.send(java.lang.String,java.lang.String,com.microsoft.azure.sdk.iot.service.Message)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.send(String deviceId, String moduleId, Message message)"
name: "send(String deviceId, String moduleId, Message message)"
nameWithType: "ServiceClient.send(String deviceId, String moduleId, Message message)"
summary: "Send a one-way message to the specified module."
parameters:
- description: "The device identifier for the target device"
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The module identifier for the target device"
name: "moduleId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The message for the device"
name: "message"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.Message?alt=com.microsoft.azure.sdk.iot.service.Message&text=Message\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void send(String deviceId, String moduleId, Message message)"
exceptions:
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"java.io.IOException?alt=java.io.IOException&text=IOException\" data-throw-if-not-resolved=\"False\" />"
- description: "This exception is thrown if the AmqpSender object is not initialized"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.exceptions.IotHubException?alt=com.microsoft.azure.sdk.iot.service.exceptions.IotHubException&text=IotHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "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."
- uid: "com.microsoft.azure.sdk.iot.service.ServiceClient.sendAsync(java.lang.String,com.microsoft.azure.sdk.iot.service.Message)"
fullName: "com.microsoft.azure.sdk.iot.service.ServiceClient.sendAsync(String deviceId, Message message)"
name: "sendAsync(String deviceId, Message message)"
nameWithType: "ServiceClient.sendAsync(String deviceId, Message message)"
summary: "Provide asynchronous access to send()"
parameters:
- description: "The device identifier for the target device"
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The message for the device"
name: "message"
type: "<xref href=\"com.microsoft.azure.sdk.iot.service.Message?alt=com.microsoft.azure.sdk.iot.service.Message&text=Message\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CompletableFuture<Void> sendAsync(String deviceId, Message message)"
desc: "Provide asynchronous access to send()"
returns:
description: "The future object for the requested operation"
type: "<xref href=\"java.util.concurrent.CompletableFuture?alt=java.util.concurrent.CompletableFuture&text=CompletableFuture\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.Void?alt=java.lang.Void&text=Void\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "Extend the ServiceClient class and provide AMPQ specific implementation."
metadata: {}
package: "com.microsoft.azure.sdk.iot.service"
artifact: com.microsoft.azure.sdk.iot:iot-service-client:1.30.0