public class CloudToDeviceMessageConnectionHandler extends ErrorLoggingBaseHandlerWithCleanup
| Modifier and Type | Field and Description |
|---|---|
protected String |
hostName |
errorProcessor, protonJExceptionParser| Constructor and Description |
|---|
CloudToDeviceMessageConnectionHandler(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential,
IotHubServiceClientProtocol protocol,
Consumer<ErrorContext> errorProcessor,
ProxyOptions proxyOptions,
SSLContext sslContext,
int keepAliveIntervalSeconds) |
CloudToDeviceMessageConnectionHandler(String connectionString,
IotHubServiceClientProtocol protocol,
Consumer<ErrorContext> errorProcessor,
ProxyOptions proxyOptions,
SSLContext sslContext,
int keepAliveIntervalSeconds) |
CloudToDeviceMessageConnectionHandler(String hostName,
com.azure.core.credential.TokenCredential credential,
IotHubServiceClientProtocol protocol,
Consumer<ErrorContext> errorProcessor,
ProxyOptions proxyOptions,
SSLContext sslContext,
int keepAliveIntervalSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeAsync(Runnable onConnectionClosedCallback) |
String |
getConnectionId() |
boolean |
isOpen() |
void |
onAuthenticationFailed(IotHubException e)
Executes when the CBS session has failed to authenticate the connection
|
void |
onAuthenticationSucceeded() |
void |
onConnectionBound(org.apache.qpid.proton.engine.Event event)
Event handler for the connection bound event
|
void |
onConnectionInit(org.apache.qpid.proton.engine.Event event) |
void |
onConnectionRemoteClose(org.apache.qpid.proton.engine.Event event) |
void |
onConnectionRemoteOpen(org.apache.qpid.proton.engine.Event event) |
void |
onLinkRemoteOpen(org.apache.qpid.proton.engine.Event event) |
void |
onReactorFinal(org.apache.qpid.proton.engine.Event event) |
void |
onReactorInit(org.apache.qpid.proton.engine.Event event) |
void |
onReceiverLinkRemoteOpen()
Callback that executes when the receiver link has opened successfully
|
void |
onSenderLinkRemoteOpen()
Callback that executes when the sender link has opened successfully
|
void |
onSessionRemoteOpen(org.apache.qpid.proton.engine.Event event) |
void |
sendAsync(String deviceId,
String moduleId,
Message iotHubMessage,
Consumer<SendResult> callback,
Object context) |
void |
verifyConnectionWasOpened()
If an exception was encountered while opening the AMQP connection, this function shall throw that saved exception
|
onConnectionLocalClose, onConnectionLocalOpen, onLinkLocalClose, onLinkLocalOpen, onLinkRemoteClose, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onTransportErroradd, children, getHandler, getHandler, handle, onConnectionFinal, onConnectionUnbound, onDelivery, onLinkFinal, onLinkFlow, onLinkInit, onLinkLocalDetach, onLinkRemoteDetach, onReactorQuiesced, onSelectableError, onSelectableExpired, onSelectableFinal, onSelectableInit, onSelectableReadable, onSelectableUpdated, onSelectableWritable, onSessionFinal, onSessionInit, onTimerTask, onTransport, onTransportClosed, onTransportHeadClosed, onTransportTailClosed, onUnhandled, setHandler, setHandlerprotected final String hostName
public CloudToDeviceMessageConnectionHandler(String connectionString, IotHubServiceClientProtocol protocol, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)
public CloudToDeviceMessageConnectionHandler(String hostName, com.azure.core.credential.TokenCredential credential, IotHubServiceClientProtocol protocol, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)
public CloudToDeviceMessageConnectionHandler(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential, IotHubServiceClientProtocol protocol, Consumer<ErrorContext> errorProcessor, ProxyOptions proxyOptions, SSLContext sslContext, int keepAliveIntervalSeconds)
public void onAuthenticationSucceeded()
public void onSenderLinkRemoteOpen()
public void onReceiverLinkRemoteOpen()
public boolean isOpen()
public void sendAsync(String deviceId, String moduleId, Message iotHubMessage, Consumer<SendResult> callback, Object context)
public void closeAsync(Runnable onConnectionClosedCallback)
public void onReactorFinal(org.apache.qpid.proton.engine.Event event)
onReactorFinal in interface org.apache.qpid.proton.engine.CoreHandleronReactorFinal in class org.apache.qpid.proton.engine.BaseHandlerpublic void onReactorInit(org.apache.qpid.proton.engine.Event event)
onReactorInit in interface org.apache.qpid.proton.engine.CoreHandleronReactorInit in class org.apache.qpid.proton.engine.BaseHandlerpublic void onConnectionBound(org.apache.qpid.proton.engine.Event event)
onConnectionBound in interface org.apache.qpid.proton.engine.CoreHandleronConnectionBound in class org.apache.qpid.proton.engine.BaseHandlerevent - The proton event objectpublic void onConnectionInit(org.apache.qpid.proton.engine.Event event)
onConnectionInit in interface org.apache.qpid.proton.engine.CoreHandleronConnectionInit in class org.apache.qpid.proton.engine.BaseHandlerpublic void onLinkRemoteOpen(org.apache.qpid.proton.engine.Event event)
onLinkRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandleronLinkRemoteOpen in class ErrorLoggingBaseHandlerWithCleanuppublic void onSessionRemoteOpen(org.apache.qpid.proton.engine.Event event)
onSessionRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandleronSessionRemoteOpen in class ErrorLoggingBaseHandlerWithCleanuppublic void onConnectionRemoteOpen(org.apache.qpid.proton.engine.Event event)
onConnectionRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandleronConnectionRemoteOpen in class ErrorLoggingBaseHandlerWithCleanuppublic void onConnectionRemoteClose(org.apache.qpid.proton.engine.Event event)
onConnectionRemoteClose in interface org.apache.qpid.proton.engine.CoreHandleronConnectionRemoteClose in class ErrorLoggingBaseHandlerWithCleanuppublic String getConnectionId()
public void verifyConnectionWasOpened()
throws IOException,
IotHubException
IOException - if an exception was encountered while openinging the AMQP connection. The encountered
exception will be the inner exceptionIotHubExceptionpublic void onAuthenticationFailed(IotHubException e)
e - the reason why authentication failed.Copyright © 2024. All rights reserved.