IotHubTransportConnection Interface
public interface IotHubTransportConnection
Interface of what all a Transport Connection object must do. Serves to decouple the Message Queueing of the Transport layer from the protocol specific details of the Connection layer.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the transport connection. |
String |
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 |
void |
open()
Opens the transport connection object |
Iot |
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. This listener updates the Transport layer of connection status updates, message arrivals, and message acknowledgements |
Method Details
close
public void close()
Closes the transport connection.
getConnectionId
public String 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
Returns:
open
public void open()
Opens the transport connection object
Throws:
sendMessage
public IotHubStatusCode sendMessage(Message message)
Send a single message to the IotHub over the Transport Connection
Parameters:
Returns:
Throws:
sendMessageResult
public boolean sendMessageResult(IotHubTransportMessage message, IotHubMessageResult result)
Send an acknowledgement to the IotHub for a message that the Transport layer received
Parameters:
Returns:
Throws:
setListener
public void 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
Parameters:
Applies to
Azure SDK for Java