EventReceivingConnectionHandler Class

public class EventReceivingConnectionHandler

Instance of the QPID-Proton-J BaseHandler class to override the events what are needed to handle the receive operation Contains and sets connection parameters (path, port, endpoint) Maintains the layers of AMQP protocol (Link, Session, Connection, Transport) Creates and sets SASL authentication for transport

Field Summary

Modifier and Type Field and Description
final String MESSAGE_FEEDBACK_RECEIVE_TAG

Constructor Summary

Constructor Description
EventReceivingConnectionHandler(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol protocol, Function<FileUploadNotification, AcknowledgementType> fileUploadNotificationReceivedCallback, Function<FeedbackBatch, AcknowledgementType> messageFeedbackReceivedCallback, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)
EventReceivingConnectionHandler(String connectionString, IotHubServiceClientProtocol protocol, Function<FileUploadNotification, AcknowledgementType> fileUploadNotificationReceivedCallback, Function<FeedbackBatch, AcknowledgementType> messageFeedbackReceivedCallback, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)
EventReceivingConnectionHandler(String hostName, TokenCredential credential, IotHubServiceClientProtocol protocol, Function<FileUploadNotification, AcknowledgementType> fileUploadNotificationReceivedCallback, Function<FeedbackBatch, AcknowledgementType> messageFeedbackReceivedCallback, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)

Method Summary

Modifier and Type Method and Description
void closeAsync(Runnable onConnectionClosedCallback)
void onAuthenticationSucceeded()
void onReactorFinal(Event event)
void onReceiverLinkRemoteOpen()
void onSenderLinkRemoteOpen()

Inherited Members

ErrorLoggingBaseHandler.errorProcessor com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.getConnectionId() AmqpConnectionHandler.hostName com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.isOpen() com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onAuthenticationFailed(IotHubException) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onConnectionBound(Event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onConnectionInit(Event) ErrorLoggingBaseHandlerWithCleanup.onConnectionLocalClose(Event event) ErrorLoggingBaseHandlerWithCleanup.onConnectionLocalOpen(Event event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onConnectionRemoteClose(Event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onConnectionRemoteOpen(Event) ErrorLoggingBaseHandlerWithCleanup.onLinkLocalClose(Event event) ErrorLoggingBaseHandlerWithCleanup.onLinkLocalOpen(Event event) ErrorLoggingBaseHandlerWithCleanup.onLinkRemoteClose(Event event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onLinkRemoteOpen(Event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onReactorInit(Event) ErrorLoggingBaseHandlerWithCleanup.onSessionLocalClose(Event event) ErrorLoggingBaseHandlerWithCleanup.onSessionLocalOpen(Event event) ErrorLoggingBaseHandlerWithCleanup.onSessionRemoteClose(Event event) com.microsoft.azure.sdk.iot.service.transport.amqps.AmqpConnectionHandler.onSessionRemoteOpen(Event) ErrorLoggingBaseHandlerWithCleanup.onTransportError(Event event) ErrorLoggingBaseHandler.protonJExceptionParser AmqpConnectionHandler.verifyConnectionWasOpened()

Field Details

MESSAGE_FEEDBACK_RECEIVE_TAG

public static final String MESSAGE_FEEDBACK_RECEIVE_TAG= "cloudToDeviceMessageFeedbackReceiver"

Constructor Details

EventReceivingConnectionHandler

public EventReceivingConnectionHandler(String hostName, AzureSasCredential azureSasCredential, IotHubServiceClientProtocol protocol, Function fileUploadNotificationReceivedCallback, Function messageFeedbackReceivedCallback, Consumer errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)

Parameters:

hostName
azureSasCredential
protocol
fileUploadNotificationReceivedCallback
messageFeedbackReceivedCallback
errorProcessor
proxyOptions
sslContext
keepAliveIntervalSeconds

EventReceivingConnectionHandler

public EventReceivingConnectionHandler(String connectionString, IotHubServiceClientProtocol protocol, Function fileUploadNotificationReceivedCallback, Function messageFeedbackReceivedCallback, Consumer errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)

Parameters:

connectionString
protocol
fileUploadNotificationReceivedCallback
messageFeedbackReceivedCallback
errorProcessor
proxyOptions
sslContext
keepAliveIntervalSeconds

EventReceivingConnectionHandler

public EventReceivingConnectionHandler(String hostName, TokenCredential credential, IotHubServiceClientProtocol protocol, Function fileUploadNotificationReceivedCallback, Function messageFeedbackReceivedCallback, Consumer errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)

Parameters:

hostName
credential
protocol
fileUploadNotificationReceivedCallback
messageFeedbackReceivedCallback
errorProcessor
proxyOptions
sslContext
keepAliveIntervalSeconds

Method Details

closeAsync

public void closeAsync(Runnable onConnectionClosedCallback)

Parameters:

onConnectionClosedCallback

onAuthenticationSucceeded

public void onAuthenticationSucceeded()

onReactorFinal

public void onReactorFinal(Event event)

Parameters:

event

onReceiverLinkRemoteOpen

public void onReceiverLinkRemoteOpen()

onSenderLinkRemoteOpen

public void onSenderLinkRemoteOpen()

Applies to