AmqpsIotHubConnection 类

定义

An AMQPS IotHub connection between a device and an IoTHub or Edgehub. This class is responsible for reacting to connection level and reactor level events. It is also responsible for creating sessions and handlers for those sessions. An instance of this object may be reused after it has been closed.

public class AmqpsIotHubConnection implements IotHubTransportConnection
继承
java.lang.Object
BaseHandler
AmqpsIotHubConnection

继承成员

构造函数

AmqpsIotHubConnection(DeviceClientConfig config, boolean isMultiplexing)
AmqpsIotHubConnection(String hostName, boolean isWebsocketConnection, SSLContext sslContext, ProxySettings proxySettings)

方法

close()

Closes the transport connection.

getConnectionId()

Gives the UUID associated with this connection instance. This string is used in conjunction with the callbacks with connection status updates to ensure that all connection status updates are relevant to this connection object

onAuthenticationFailed(String deviceId, TransportException transportException)
onAuthenticationSessionOpened()
onCBSSessionClosedUnexpectedly(ErrorCondition errorCondition)
onConnectionBound(Event event)
onConnectionInit(Event event)
onConnectionLocalClose(Event event)
onConnectionLocalOpen(Event event)
onConnectionRemoteClose(Event event)
onConnectionRemoteOpen(Event event)
onDeviceSessionOpened(String deviceId)
onMessageAcknowledged(Message message, DeliveryState deliveryState, String deviceId)
onMessageReceived(IotHubTransportMessage message)
onReactorFinal(Event event)
onReactorInit(Event event)
onSessionClosedAsExpected(String deviceId)
onSessionClosedUnexpectedly(ErrorCondition errorCondition, String deviceId)
onTimerTask(Event event)
onTransportError(Event event)
open()

Opens the transport connection object

registerMultiplexedDevice(DeviceClientConfig config)
sendMessage(com.microsoft.azure.sdk.iot.device.Message message)
sendMessageResult(IotHubTransportMessage message, IotHubMessageResult result)

Send an acknowledgement to the IotHub for a message that the Transport layer received

setListener(IotHubListener listener)

Sets a listener into the Transport Connection object. This listener updates the Transport layer of connection status updates, message arrivals, and message acknowledgements

unregisterMultiplexedDevice(DeviceClientConfig config)

适用于