public interface IotHubTransportConnection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the transport connection.
|
java.lang.String |
getConnectionId()
Gives the UUID associated with this connection instance.
|
void |
open()
Opens the transport connection object
|
IotHubStatusCode |
sendMessage(Message message)
Send a single message to the IotHub over the Transport Connection
|
boolean |
sendMessageResult(IotHubTransportMessage message,
IotHubMessageResult result)
Send an acknowledgement to the IotHub for a message that the Transport layer received
|
void |
setListener(IotHubListener listener)
Sets a listener into the Transport Connection object.
|
void open() throws TransportException
TransportException - If any exceptions are encountered while opening the connectionvoid setListener(IotHubListener listener)
listener - the listener for connection status updates, message arrivals, and message acknowledgementsvoid close()
IotHubStatusCode sendMessage(Message message) throws TransportException
message - the message to sendTransportException - if any exception is encountered while sending the messageboolean sendMessageResult(IotHubTransportMessage message, IotHubMessageResult result) throws TransportException
message - the message to acknowledgeresult - the acknowledgement value to notify the service ofTransportException - if an exception occurred while sending the acknowledgementjava.lang.String getConnectionId()
Copyright © 2023. All rights reserved.