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

318 строки
54 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient"
name: "MultiplexingClient"
nameWithType: "MultiplexingClient"
summary: "A client for creating multiplexed connections to IoT Hub."
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 **MultiplexingClient**"
constructors:
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MultiplexingClient(java.lang.String,com.microsoft.azure.sdk.iot.device.IotHubClientProtocol)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MultiplexingClient(String hostName, IotHubClientProtocol protocol)"
name: "MultiplexingClient(String hostName, IotHubClientProtocol protocol)"
nameWithType: "MultiplexingClient.MultiplexingClient(String hostName, IotHubClientProtocol protocol)"
summary: "Instantiate a new Multiplexing<wbr>Client that will establish a multiplexed connection through a proxy."
parameters:
- name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The transport protocol that this client will build the multiplexed connection on. Must be either\n <xref uid=\"com.microsoft.azure.sdk.iot.device.IotHubClientProtocol.AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IotHubClientProtocol#AMQPS\"></xref> or <xref uid=\"com.microsoft.azure.sdk.iot.device.IotHubClientProtocol.AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IotHubClientProtocol#AMQPS_WS\"></xref>."
name: "protocol"
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\" />"
syntax: "public MultiplexingClient(String hostName, IotHubClientProtocol protocol)"
desc: "Instantiate a new MultiplexingClient that will establish a multiplexed connection through a proxy."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MultiplexingClient(java.lang.String,com.microsoft.azure.sdk.iot.device.IotHubClientProtocol,com.microsoft.azure.sdk.iot.device.MultiplexingClientOptions)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MultiplexingClient(String hostName, IotHubClientProtocol protocol, MultiplexingClientOptions options)"
name: "MultiplexingClient(String hostName, IotHubClientProtocol protocol, MultiplexingClientOptions options)"
nameWithType: "MultiplexingClient.MultiplexingClient(String hostName, IotHubClientProtocol protocol, MultiplexingClientOptions options)"
summary: "Instantiate a new Multiplexing<wbr>Client that will establish a multiplexed connection through a proxy."
parameters:
- name: "hostName"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "The transport protocol that this client will build the multiplexed connection on. Must be\n <xref uid=\"com.microsoft.azure.sdk.iot.device.IotHubClientProtocol.AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IotHubClientProtocol#AMQPS_WS\"></xref> since using <xref uid=\"com.microsoft.azure.sdk.iot.device.IotHubClientProtocol.AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IotHubClientProtocol#AMQPS\"></xref> does not support proxies."
name: "protocol"
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\" />"
- description: "The optional parameters to configure this client to use."
name: "options"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.MultiplexingClientOptions?alt=com.microsoft.azure.sdk.iot.device.MultiplexingClientOptions&text=MultiplexingClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public MultiplexingClient(String hostName, IotHubClientProtocol protocol, MultiplexingClientOptions options)"
desc: "Instantiate a new MultiplexingClient that will establish a multiplexed connection through a proxy."
fields:
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.DEFAULT_RECEIVE_PERIOD_MILLIS"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.DEFAULT_RECEIVE_PERIOD_MILLIS"
name: "DEFAULT_RECEIVE_PERIOD_MILLIS"
nameWithType: "MultiplexingClient.DEFAULT_RECEIVE_PERIOD_MILLIS"
modifiers:
- "static"
- "final"
field:
value: "10"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final long DEFAULT_RECEIVE_PERIOD_MILLIS"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.DEFAULT_SEND_PERIOD_MILLIS"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.DEFAULT_SEND_PERIOD_MILLIS"
name: "DEFAULT_SEND_PERIOD_MILLIS"
nameWithType: "MultiplexingClient.DEFAULT_SEND_PERIOD_MILLIS"
modifiers:
- "static"
- "final"
field:
value: "10"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final long DEFAULT_SEND_PERIOD_MILLIS"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS"
name: "MAX_MULTIPLEX_DEVICE_COUNT_AMQPS"
nameWithType: "MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS"
summary: "The maximum number of devices that can be multiplexed together on a single multiplexed AMQPS connection"
modifiers:
- "static"
- "final"
field:
value: "1000"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final int MAX_MULTIPLEX_DEVICE_COUNT_AMQPS"
desc: "The maximum number of devices that can be multiplexed together on a single multiplexed AMQPS connection"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS"
name: "MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS"
nameWithType: "MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS"
summary: "The maximum number of devices that can be multiplexed together on a single multiplexed AMQPS\\_WS connection"
modifiers:
- "static"
- "final"
field:
value: "500"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final int MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS"
desc: "The maximum number of devices that can be multiplexed together on a single multiplexed AMQPS\\_WS connection"
methods:
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()"
name: "close()"
nameWithType: "MultiplexingClient.close()"
summary: "Close this multiplexing client."
syntax: "public void close()"
exceptions:
- description: "If any IO errors occur when fulfilling this request."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Close this multiplexing client. This will close all active device sessions as well as the AMQP connection.\n\nIf this client is already closed, then this method will do nothing.\n\nOnce closed, this client can be re-opened. It will preserve all previously registered device clients."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.getRegisteredDeviceCount()"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.getRegisteredDeviceCount()"
name: "getRegisteredDeviceCount()"
nameWithType: "MultiplexingClient.getRegisteredDeviceCount()"
summary: "Get the number of currently registered devices on this multiplexing client."
syntax: "public int getRegisteredDeviceCount()"
desc: "Get the number of currently registered devices on this multiplexing client."
returns:
description: "The number of currently registered devices on this multiplexing client."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.isDeviceRegistered(java.lang.String)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.isDeviceRegistered(String deviceId)"
name: "isDeviceRegistered(String deviceId)"
nameWithType: "MultiplexingClient.isDeviceRegistered(String deviceId)"
summary: "Returns if a device client for the provided device Id is already registered to this multiplexing client."
parameters:
- description: "The Id of the device client to look for."
name: "deviceId"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public boolean isDeviceRegistered(String deviceId)"
desc: "Returns if a device client for the provided device Id is already registered to this multiplexing client."
returns:
description: "True if a device client is already registered with this Id. False otherwise."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()"
name: "open()"
nameWithType: "MultiplexingClient.open()"
summary: "Opens this multiplexing client."
syntax: "public void open()"
exceptions:
- description: "If any IO or authentication errors occur while opening the multiplexed connection."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Opens this multiplexing client. This may be done before or after registering any number of device clients.\n\nThis call behaves synchronously, so if it returns without throwing, then all registered device clients were successfully opened.\n\nIf this client is already open, then this method will do nothing."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerConnectionStatusChangeCallback(com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback,java.lang.Object)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerConnectionStatusChangeCallback(IotHubConnectionStatusChangeCallback callback, Object callbackContext)"
name: "registerConnectionStatusChangeCallback(IotHubConnectionStatusChangeCallback callback, Object callbackContext)"
nameWithType: "MultiplexingClient.registerConnectionStatusChangeCallback(IotHubConnectionStatusChangeCallback callback, Object callbackContext)"
summary: "Registers a callback to be executed when the connection status of the multiplexed connection as a whole changes."
parameters:
- description: "The callback to be fired when the connection status of the multiplexed connection changes.\n Can be null to unset this listener as long as the provided callbackContext is also null."
name: "callback"
type: "<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\" />"
- description: "a context to be passed to the callback. Can be <code>null</code>."
name: "callbackContext"
type: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void registerConnectionStatusChangeCallback(IotHubConnectionStatusChangeCallback callback, Object callbackContext)"
desc: "Registers a callback to be executed when the connection status of the multiplexed connection as a whole changes. The callback will be fired with a status and a reason why the multiplexed connection's status changed. When the callback is fired, the provided context will be provided alongside the status and reason.\n\nNote that this callback will not be fired for device specific connection status changes. In order to be notified when a particular device's connection status changes, you will need to register a connection status change callback on that device client instance using <xref uid=\"com.microsoft.azure.sdk.iot.device.DeviceClient.registerConnectionStatusChangeCallback*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"DeviceClient#registerConnectionStatusChangeCallback(IotHubConnectionStatusChangeCallback, Object)\"></xref>.\n\nNote that the thread used to deliver this callback should not be used to call open()/closeNow() on the client that this callback belongs to. All open()/closeNow() operations should be done on a separate thread"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClient(DeviceClient deviceClient)"
name: "registerDeviceClient(DeviceClient deviceClient)"
nameWithType: "MultiplexingClient.registerDeviceClient(DeviceClient deviceClient)"
summary: "Register a device client to this multiplexing client."
parameters:
- description: "The device client to associate with this multiplexing client."
name: "deviceClient"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void registerDeviceClient(DeviceClient deviceClient)"
exceptions:
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Register a device client to this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUsers should use <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> for registering multiple devices as it has some performance improvements over repeatedly calling this method for individual device registrations. This method blocks on each registration, whereas <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> blocks on all of the registrations after starting them all asynchronously.\n\nA device client can be unregistered using <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient, long)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable, long)\"></xref>. A device client will not be unregistered automatically if it encounters a non-retryable exception, so users are responsible for unregistering a device client when they no longer want it in this multiplexing client.\n\nUp to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\"></xref> devices can be registered on a multiplexed AMQPS connection, and up to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\"></xref> devices can be registered on a multiplexed AMQPS\\_WS connection.\n\nIf the multiplexing client is already open, then this device client will automatically be opened, too. If the multiplexing client is not open yet, then this device client will not be opened until <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MultiplexingClient#open()\"></xref> is called.\n\nIf the multiplexed connection is already open, then this call will add this device client to the multiplexed connection, and then will block until the registration has been completed.\n\nAny proxy settings set to the provided device clients will be overwritten by the proxy settings of this multiplexing client.\n\nThe registered device client must use the same transport protocol (AMQPS or AMQPS\\_WS) that this multiplexing client uses.\n\nEach registered device client may have its own retry policy and its own SAS token expiry time, separate from every other registered device client.\n\nThe registered device client must use symmetric key based authentication.\n\nThe registered device client must belong to the same IoT Hub as all previously registered device clients.\n\nIf the provided device client is already registered to this multiplexing client, then then this method will do nothing.\n\nAny subscriptions (twin, methods, cloud to device messages) set on this device client from when it was previously registered to any multiplexing client will need to be set again as subscriptions and their callbacks are not preserved."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
name: "registerDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
nameWithType: "MultiplexingClient.registerDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
summary: "Register a device client to this multiplexing client."
parameters:
- description: "The device client to associate with this multiplexing client."
name: "deviceClient"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />"
- description: "How long (in milliseconds) to let this operation wait for all registrations to complete. If this threshold is passed, a <xref uid=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\"></xref> is thrown."
name: "timeoutMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void registerDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
exceptions:
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Register a device client to this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUsers should use <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> for registering multiple devices as it has some performance improvements over repeatedly calling this method for individual device registrations. This method blocks on each registration, whereas <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> blocks on all of the registrations after starting them all asynchronously.\n\nA device client can be unregistered using <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient, long)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable, long)\"></xref>. A device client will not be unregistered automatically if it encounters a non-retryable exception, so users are responsible for unregistering a device client when they no longer want it in this multiplexing client.\n\nUp to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\"></xref> devices can be registered on a multiplexed AMQPS connection, and up to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\"></xref> devices can be registered on a multiplexed AMQPS\\_WS connection.\n\nIf the multiplexing client is already open, then this device client will automatically be opened, too. If the multiplexing client is not open yet, then this device client will not be opened until <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MultiplexingClient#open()\"></xref> is called.\n\nIf the multiplexed connection is already open, then this call will add this device client to the multiplexed connection, and then will block until the registration has been completed.\n\nAny proxy settings set to the provided device clients will be overwritten by the proxy settings of this multiplexing client.\n\nThe registered device client must use the same transport protocol (AMQPS or AMQPS\\_WS) that this multiplexing client uses.\n\nEach registered device client may have its own retry policy and its own SAS token expiry time, separate from every other registered device client.\n\nThe registered device client must use symmetric key based authentication.\n\nThe registered device client must belong to the same IoT Hub as all previously registered device clients.\n\nIf the provided device client is already registered to this multiplexing client, then then this method will do nothing.\n\nAny subscriptions (twin, methods, cloud to device messages) set on this device client from when it was previously registered to any multiplexing client will need to be set again as subscriptions and their callbacks are not preserved."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(Iterable<DeviceClient> deviceClients)"
name: "registerDeviceClients(Iterable<DeviceClient> deviceClients)"
nameWithType: "MultiplexingClient.registerDeviceClients(Iterable<DeviceClient> deviceClients)"
summary: "Register multiple device clients to this multiplexing client."
parameters:
- description: "The device clients to associate with this multiplexing client."
name: "deviceClients"
type: "<xref href=\"java.lang.Iterable?alt=java.lang.Iterable&text=Iterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public void registerDeviceClients(Iterable<DeviceClient> deviceClients)"
exceptions:
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Register multiple device clients to this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUp to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\"></xref> devices can be registered on a multiplexed AMQPS connection, and up to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\"></xref> devices can be registered on a multiplexed AMQPS\\_WS connection.\n\nA device client can be unregistered using <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient, long)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable, long)\"></xref>. A device client will not be unregistered automatically if it encounters a non-retryable exception, so users are responsible for unregistering a device client when they no longer want it in this multiplexing client.\n\nIf the multiplexing client is already open, then these device clients will automatically be opened, too. If the multiplexing client is not open yet, then these device clients will not be opened until <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MultiplexingClient#open()\"></xref> is called.\n\nIf the multiplexed connection is already open, then this call will asynchronously add each device client to the multiplexed connection, and then will block until all registrations have been completed.\n\nAny proxy settings set to the provided device clients will be overwritten by the proxy settings of this multiplexing client.\n\nThe registered device clients must use the same transport protocol (AMQPS or AMQPS\\_WS) that this multiplexing client uses.\n\nEach registered device client may have its own retry policy and its own SAS token expiry time, separate from every other registered device client.\n\nThe registered device clients must use symmetric key based authentication.\n\nThe registered device clients must belong to the same IoT Hub as all previously registered device clients.\n\nIf any of these device clients are already registered to this multiplexing client, then then this method will not do anything to that particular device client. All other provided device clients will still be registered though.\n\nAny subscriptions (twin, methods, cloud to device messages) set on these device clients from when it was previously registered to any multiplexing client will need to be set again as subscriptions and their callbacks are not preserved."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
name: "registerDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
nameWithType: "MultiplexingClient.registerDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
summary: "Register multiple device clients to this multiplexing client."
parameters:
- description: "The device clients to associate with this multiplexing client."
name: "deviceClients"
type: "<xref href=\"java.lang.Iterable?alt=java.lang.Iterable&text=Iterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "How long (in milliseconds) to let this operation wait for all registrations to complete. If this threshold is passed, a <xref uid=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\"></xref> is thrown."
name: "timeoutMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void registerDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
exceptions:
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the registration to succeed. This\n will never be thrown if the multiplexing client is not open yet."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Register multiple device clients to this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUp to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS\"></xref> devices can be registered on a multiplexed AMQPS connection, and up to <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#MAX_MULTIPLEX_DEVICE_COUNT_AMQPS_WS\"></xref> devices can be registered on a multiplexed AMQPS\\_WS connection.\n\nA device client can be unregistered using <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClient(DeviceClient, long)\"></xref>, <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable, long)\"></xref>. A device client will not be unregistered automatically if it encounters a non-retryable exception, so users are responsible for unregistering a device client when they no longer want it in this multiplexing client.\n\nIf the multiplexing client is already open, then these device clients will automatically be opened, too. If the multiplexing client is not open yet, then these device clients will not be opened until <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.open()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MultiplexingClient#open()\"></xref> is called.\n\nIf the multiplexed connection is already open, then this call will asynchronously add each device client to the multiplexed connection, and then will block until all registrations have been completed.\n\nAny proxy settings set to the provided device clients will be overwritten by the proxy settings of this multiplexing client.\n\nThe registered device clients must use the same transport protocol (AMQPS or AMQPS\\_WS) that this multiplexing client uses.\n\nEach registered device client may have its own retry policy and its own SAS token expiry time, separate from every other registered device client.\n\nThe registered device clients must use symmetric key based authentication.\n\nThe registered device clients must belong to the same IoT Hub as all previously registered device clients.\n\nIf any of these device clients are already registered to this multiplexing client, then then this method will not do anything to that particular device client. All other provided device clients will still be registered though.\n\nAny subscriptions (twin, methods, cloud to device messages) set on these device clients from when it was previously registered to any multiplexing client will need to be set again as subscriptions and their callbacks are not preserved."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.setRetryPolicy(com.microsoft.azure.sdk.iot.device.transport.RetryPolicy)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.setRetryPolicy(RetryPolicy retryPolicy)"
name: "setRetryPolicy(RetryPolicy retryPolicy)"
nameWithType: "MultiplexingClient.setRetryPolicy(RetryPolicy retryPolicy)"
summary: "Sets the given retry policy for the multiplexing client level connection management."
parameters:
- description: "The policy that the multiplexing client will use when reconnecting."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.transport.RetryPolicy?alt=com.microsoft.azure.sdk.iot.device.transport.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setRetryPolicy(RetryPolicy retryPolicy)"
desc: "Sets the given retry policy for the multiplexing client level connection management. [ See more details about the default retry policy and about using custom retry policies here][See more details about the default retry policy and about using custom retry policies here]\n\n\n[See more details about the default retry policy and about using custom retry policies here]: https://github.com/Azure/azure-iot-sdk-java/blob/master/device/iot-device-client/devdoc/requirement_docs/com/microsoft/azure/iothub/retryPolicy.md"
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(DeviceClient deviceClient)"
name: "unregisterDeviceClient(DeviceClient deviceClient)"
nameWithType: "MultiplexingClient.unregisterDeviceClient(DeviceClient deviceClient)"
summary: "Unregister a device client from this multiplexing client."
parameters:
- description: "The device client to unregister from this multiplexing client."
name: "deviceClient"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void unregisterDeviceClient(DeviceClient deviceClient)"
exceptions:
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Unregister a device client from this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUsers should use <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref> for unregistering multiple devices as it has some performance improvements over repeatedly calling this method for individual device unregistrations. This method blocks on each unregistration, whereas <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> blocks on all of the unregistrations after starting them all asynchronously.\n\nIf the multiplexed connection is already open, then this call will close the AMQP device session associated with this device, but it will not close any other registered device sessions or the multiplexing client itself.\n\nIf the multiplexed connection is already open, and this call would unregister the last device client, the multiplexed connection will remain open. The multiplexed connection can only be closed by calling <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#close()\"></xref>\n\nOnce a device client is unregistered, it may be re-registered to this or any other multiplexing client. It cannot be used in non-multiplexing scenarios or used by the deprecated <xref uid=\"com.microsoft.azure.sdk.iot.device.TransportClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TransportClient\"></xref>.\n\nAny subscriptions set on this device client for twin/methods/cloud to device messages will need to be set again after this device is re-registered."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(com.microsoft.azure.sdk.iot.device.DeviceClient,long)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
name: "unregisterDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
nameWithType: "MultiplexingClient.unregisterDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
summary: "Unregister a device client from this multiplexing client."
parameters:
- description: "The device client to unregister from this multiplexing client."
name: "deviceClient"
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />"
- description: "How long (in milliseconds) to let this operation wait for all unregistrations to complete. If this threshold is passed, a <xref uid=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\"></xref> is thrown."
name: "timeoutMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void unregisterDeviceClient(DeviceClient deviceClient, long timeoutMilliseconds)"
exceptions:
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Unregister a device client from this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nUsers should use <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#unregisterDeviceClients(Iterable)\"></xref> for unregistering multiple devices as it has some performance improvements over repeatedly calling this method for individual device unregistrations. This method blocks on each unregistration, whereas <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.registerDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#registerDeviceClients(Iterable)\"></xref> blocks on all of the unregistrations after starting them all asynchronously.\n\nIf the multiplexed connection is already open, then this call will close the AMQP device session associated with this device, but it will not close any other registered device sessions or the multiplexing client itself.\n\nIf the multiplexed connection is already open, and this call would unregister the last device client, the multiplexed connection will remain open. The multiplexed connection can only be closed by calling <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#close()\"></xref>\n\nOnce a device client is unregistered, it may be re-registered to this or any other multiplexing client. It cannot be used in non-multiplexing scenarios or used by the deprecated <xref uid=\"com.microsoft.azure.sdk.iot.device.TransportClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TransportClient\"></xref>.\n\nAny subscriptions set on this device client for twin/methods/cloud to device messages will need to be set again after this device is re-registered."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(Iterable<DeviceClient> deviceClients)"
name: "unregisterDeviceClients(Iterable<DeviceClient> deviceClients)"
nameWithType: "MultiplexingClient.unregisterDeviceClients(Iterable<DeviceClient> deviceClients)"
summary: "Unregister multiple device clients from this multiplexing client."
parameters:
- description: "The device clients to unregister from this multiplexing client."
name: "deviceClients"
type: "<xref href=\"java.lang.Iterable?alt=java.lang.Iterable&text=Iterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public void unregisterDeviceClients(Iterable<DeviceClient> deviceClients)"
exceptions:
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Unregister multiple device clients from this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nIf the multiplexed connection is already open, then this call will close the AMQP device session associated with this device, but it will not close any other registered device sessions or the multiplexing client itself.\n\nIf the multiplexed connection is already open, and this call would unregister the last device clients, the multiplexed connection will remain open. The multiplexed connection can only be closed by calling <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#close()\"></xref>\n\nOnce a device client is unregistered, it may be re-registered to this or any other multiplexing client. It cannot be used in non-multiplexing scenarios or used by the deprecated <xref uid=\"com.microsoft.azure.sdk.iot.device.TransportClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TransportClient\"></xref>.\n\nAny subscriptions set on these device clients for twin/methods/cloud to device messages will need to be set again after these devices are re-registered."
- uid: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(java.lang.Iterable<com.microsoft.azure.sdk.iot.device.DeviceClient>,long)"
fullName: "com.microsoft.azure.sdk.iot.device.MultiplexingClient.unregisterDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
name: "unregisterDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
nameWithType: "MultiplexingClient.unregisterDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
summary: "Unregister multiple device clients from this multiplexing client."
parameters:
- description: "The device clients to unregister from this multiplexing client."
name: "deviceClients"
type: "<xref href=\"java.lang.Iterable?alt=java.lang.Iterable&text=Iterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.azure.sdk.iot.device.DeviceClient?alt=com.microsoft.azure.sdk.iot.device.DeviceClient&text=DeviceClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "How long (in milliseconds) to let this operation wait for all unregistrations to complete. If this threshold is passed, a <xref uid=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientDeviceRegistrationTimeoutException\"></xref> is thrown."
name: "timeoutMilliseconds"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void unregisterDeviceClients(Iterable<DeviceClient> deviceClients, long timeoutMilliseconds)"
exceptions:
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"java.lang.InterruptedException?alt=java.lang.InterruptedException&text=InterruptedException\" data-throw-if-not-resolved=\"False\" />"
- description: "If the thread gets interrupted while waiting for the unregistration to succeed."
type: "<xref href=\"com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException?alt=com.microsoft.azure.sdk.iot.device.exceptions.MultiplexingClientException&text=MultiplexingClientException\" data-throw-if-not-resolved=\"False\" />"
desc: "Unregister multiple device clients from this multiplexing client. This method may be called before or after opening the multiplexed connection.\n\nIf the multiplexed connection is already open, then this call will close the AMQP device session associated with this device, but it will not close any other registered device sessions or the multiplexing client itself.\n\nIf the multiplexed connection is already open, and this call would unregister the last device clients, the multiplexed connection will remain open. The multiplexed connection can only be closed by calling <xref uid=\"com.microsoft.azure.sdk.iot.device.MultiplexingClient.close()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#close()\"></xref>\n\nOnce a device client is unregistered, it may be re-registered to this or any other multiplexing client. It cannot be used in non-multiplexing scenarios or used by the deprecated <xref uid=\"com.microsoft.azure.sdk.iot.device.TransportClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TransportClient\"></xref>.\n\nAny subscriptions set on these device clients for twin/methods/cloud to device messages will need to be set again after these devices are re-registered."
type: "class"
desc: "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.\n\nA 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.\n\nA 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.\n\nOnly AMQPS and AMQPS\\_WS support multiplexing, and only symmetric key authenticated devices can be multiplexed.\n\n<xref uid=\"com.microsoft.azure.sdk.iot.device.ModuleClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ModuleClient\"></xref> instances cannot be multiplexed."
metadata: {}
package: "com.microsoft.azure.sdk.iot.device"
artifact: com.microsoft.azure.sdk.iot:iot-device-client:1.30.1