public class FeedbackReceiver extends Receiver
| Constructor and Description |
|---|
FeedbackReceiver(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol)
Constructor to verify initialization parameters
Create instance of AmqpReceive
|
FeedbackReceiver(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
String deviceId)
Deprecated.
As of release 1.1.15, replaced by
FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close AmqpReceive object
|
CompletableFuture<Void> |
closeAsync()
Async wrapper for close() operation
|
void |
open()
Open AmqpReceive object
|
CompletableFuture<Void> |
openAsync()
Async wrapper for open() operation
|
FeedbackBatch |
receive()
Receive FeedbackBatch with default timeout
|
FeedbackBatch |
receive(long timeoutMs)
Receive FeedbackBatch with specific timeout
|
CompletableFuture<FeedbackBatch> |
receiveAsync()
Async wrapper for receive() operation with default timeout
|
CompletableFuture<FeedbackBatch> |
receiveAsync(long timeoutMs)
Async wrapper for receive() operation with specific timeout
|
@Deprecated public FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, String deviceId)
FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol)hostName - The iot hub host nameuserName - The iot hub user namesasToken - The iot hub SAS token for the given deviceiotHubServiceClientProtocol - The iot hub protocol namedeviceId - The device idpublic FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol)
hostName - The iot hub host nameuserName - The iot hub user namesasToken - The iot hub SAS token for the given deviceiotHubServiceClientProtocol - protocol to be usedpublic void open()
throws IOException
IOException - This exception is thrown if the input AmqpReceive object is nullpublic void close()
throws IOException
IOException - This exception is thrown if the input AmqpReceive object is nullpublic FeedbackBatch receive() throws IOException, InterruptedException
IOException - This exception is thrown if the input AmqpReceive object is nullInterruptedException - This exception is thrown if the receive process has been interruptedpublic FeedbackBatch receive(long timeoutMs) throws IOException, InterruptedException
timeoutMs - The timeout in millisecondsIOException - This exception is thrown if the input AmqpReceive object is nullInterruptedException - This exception is thrown if the receive process has been interruptedpublic CompletableFuture<Void> openAsync()
public CompletableFuture<Void> closeAsync()
closeAsync in class Receiverpublic CompletableFuture<FeedbackBatch> receiveAsync()
receiveAsync in class Receiverpublic CompletableFuture<FeedbackBatch> receiveAsync(long timeoutMs)
receiveAsync in class ReceiverCopyright © 2017. All rights reserved.