public class HttpsTransportManager
extends java.lang.Object
| Constructor and Description |
|---|
HttpsTransportManager(ClientConfiguration config)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
HttpsResponse |
getFileUploadSasUri(IotHubTransportMessage message) |
DirectMethodResponse |
invokeMethod(DirectMethodRequest directMethodRequest,
java.lang.String deviceId,
java.lang.String moduleId)
Invoke a direct method to the provided uri
|
Message |
receive()
Pull the IotHub looking for new message.
|
HttpsResponse |
send(IotHubTransportMessage message,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
This is a blocking send message.
|
HttpsResponse |
sendFileUploadNotification(IotHubTransportMessage message) |
public HttpsTransportManager(ClientConfiguration config) throws java.lang.IllegalArgumentException
config - is the set of device configurations.java.lang.IllegalArgumentException - is the config is null.public HttpsResponse getFileUploadSasUri(IotHubTransportMessage message) throws java.io.IOException
java.io.IOExceptionpublic HttpsResponse sendFileUploadNotification(IotHubTransportMessage message) throws java.io.IOException
java.io.IOExceptionpublic HttpsResponse send(IotHubTransportMessage message, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException, java.lang.IllegalArgumentException
message - is the message to send.additionalHeaders - the http headers to use in the request.java.io.IOException - if the IotHub communication failed.java.lang.IllegalArgumentException - if the provided message is null, or invalid.public Message receive() throws java.io.IOException
null is there is no new message to read.java.io.IOException - if the IotHub communication failed.public DirectMethodResponse invokeMethod(DirectMethodRequest directMethodRequest, java.lang.String deviceId, java.lang.String moduleId) throws java.io.IOException, TransportException
directMethodRequest - the method request to makedeviceId - the device id of the device the moduleId belongs tomoduleId - the module id of the module to invoke the method onjava.io.IOException - if the IotHub cannot be reachedTransportException - if any issues occur when sending the http request to its targetCopyright © 2023. All rights reserved.