FeedbackReceiver Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. Receiver - com.
microsoft. azure. sdk. iot. service. FeedbackReceiver
- com.
- com.
public class FeedbackReceiver
extends Receiver
FeedbackReceiver is a specialized receiver whose ReceiveAsync method returns a FeedbackBatch instead of a Message.
Constructor Summary
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Close Amqp |
java.util.concurrent.CompletableFuture<java.lang.Void> |
closeAsync()
Async wrapper for close() operation |
void |
open()
Open Amqp |
java.util.concurrent.CompletableFuture<java.lang.Void> |
openAsync()
Async wrapper for open() operation |
Feedback |
receive()
Receive Feedback |
Feedback |
receive(long timeoutMs)
Receive Feedback |
java.util.concurrent.CompletableFuture<Feedback |
receiveAsync()
Async wrapper for receive() operation with default timeout |
java.util.concurrent.CompletableFuture<Feedback |
receiveAsync(long timeoutMs)
Async wrapper for receive() operation with specific timeout |
Methods inherited from Receiver
Methods inherited from java.lang.Object
Constructor Details
FeedbackReceiver
public FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol)
Constructor to verify initialization parameters Create instance of AmqpReceive
Parameters:
FeedbackReceiver
public FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions)
Constructor to verify initialization parameters Create instance of AmqpReceive
Parameters:
FeedbackReceiver
public FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
Constructor to verify initialization parameters Create instance of AmqpReceive
Parameters:
FeedbackReceiver
public FeedbackReceiver(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, String deviceId)
Deprecated
Constructor to verify initialization parameters Create instance of AmqpReceive
Parameters:
Method Details
close
public void close()
Close AmqpReceive object
Throws:
closeAsync
public CompletableFuture
Async wrapper for close() operation
Overrides:
FeedbackReceiver.closeAsync()Returns:
open
public void open()
Open AmqpReceive object
Throws:
openAsync
public CompletableFuture
Async wrapper for open() operation
Overrides:
FeedbackReceiver.openAsync()Returns:
receive
public FeedbackBatch receive()
Receive FeedbackBatch with default timeout This function is synchronized internally so that only one receive operation is allowed at a time. In order to do more receive operations at a time, you will need to instantiate another FeedbackReceiver instance.
Returns:
Throws:
receive
public FeedbackBatch receive(long timeoutMs)
Receive FeedbackBatch with specific timeout This function is synchronized internally so that only one receive operation is allowed at a time. In order to do more receive operations at a time, you will need to instantiate another FeedbackReceiver instance.
Parameters:
Returns:
Throws:
receiveAsync
public CompletableFuture
Async wrapper for receive() operation with default timeout
Overrides:
FeedbackReceiver.receiveAsync()Returns:
receiveAsync
public CompletableFuture
Async wrapper for receive() operation with specific timeout
Overrides:
FeedbackReceiver.receiveAsync(long timeoutMs)Parameters:
Returns:
Applies to
Azure SDK for Java