public abstract class AmqpConnectionHandler
extends com.microsoft.azure.sdk.iot.deps.transport.amqp.ErrorLoggingBaseHandlerWithCleanup
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.qpid.proton.engine.Connection |
connection |
protected String |
hostName |
protected IotHubServiceClientProtocol |
iotHubServiceClientProtocol |
protected ProxyOptions |
proxyOptions |
protected String |
sasToken |
protected SSLContext |
sslContext |
protected String |
userName |
| Modifier | Constructor and Description |
|---|---|
protected |
AmqpConnectionHandler(String hostName,
com.azure.core.credential.AzureSasCredential sasTokenProvider,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
ProxyOptions proxyOptions,
SSLContext sslContext) |
protected |
AmqpConnectionHandler(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
ProxyOptions proxyOptions,
SSLContext sslContext) |
protected |
AmqpConnectionHandler(String hostName,
com.azure.core.credential.TokenCredential credential,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
ProxyOptions proxyOptions,
SSLContext sslContext) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getConnectionId() |
void |
onAuthenticationFailed(IotHubException e)
Executes when the CBS session has failed to authenticate the connection
|
void |
onAuthenticationSucceeded()
Executes when the CBS session has successfully authenticated the connection
|
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 |
onConnectionRemoteOpen(org.apache.qpid.proton.engine.Event event) |
void |
onLinkRemoteOpen(org.apache.qpid.proton.engine.Event event) |
void |
onReactorInit(org.apache.qpid.proton.engine.Event event) |
void |
onSessionRemoteOpen(org.apache.qpid.proton.engine.Event event) |
protected void |
verifyConnectionWasOpened()
If an exception was encountered while opening the AMQP connection, this function shall throw that saved exception
|
onConnectionLocalClose, onConnectionLocalOpen, onConnectionRemoteClose, onLinkLocalClose, onLinkLocalOpen, onLinkRemoteClose, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onTransportErroradd, children, getHandler, getHandler, handle, onConnectionFinal, onConnectionUnbound, onDelivery, onLinkFinal, onLinkFlow, onLinkInit, onLinkLocalDetach, onLinkRemoteDetach, onReactorFinal, onReactorQuiesced, onSelectableError, onSelectableExpired, onSelectableFinal, onSelectableInit, onSelectableReadable, onSelectableUpdated, onSelectableWritable, onSessionFinal, onSessionInit, onTimerTask, onTransport, onTransportClosed, onTransportHeadClosed, onTransportTailClosed, onUnhandled, setHandler, setHandlerprotected final String hostName
protected String userName
protected String sasToken
protected IotHubServiceClientProtocol iotHubServiceClientProtocol
protected ProxyOptions proxyOptions
protected SSLContext sslContext
protected org.apache.qpid.proton.engine.Connection connection
protected AmqpConnectionHandler(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
protected AmqpConnectionHandler(String hostName, com.azure.core.credential.AzureSasCredential sasTokenProvider, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
protected AmqpConnectionHandler(String hostName, com.azure.core.credential.TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
public 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 com.microsoft.azure.sdk.iot.deps.transport.amqp.ErrorLoggingBaseHandlerWithCleanuppublic void onSessionRemoteOpen(org.apache.qpid.proton.engine.Event event)
onSessionRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandleronSessionRemoteOpen in class com.microsoft.azure.sdk.iot.deps.transport.amqp.ErrorLoggingBaseHandlerWithCleanuppublic void onConnectionRemoteOpen(org.apache.qpid.proton.engine.Event event)
onConnectionRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandleronConnectionRemoteOpen in class com.microsoft.azure.sdk.iot.deps.transport.amqp.ErrorLoggingBaseHandlerWithCleanupprotected String getConnectionId()
protected void verifyConnectionWasOpened()
throws IOException
IOException - if an exception was encountered while openinging the AMQP connection. The encountered
exception will be the inner exceptionpublic void onAuthenticationFailed(IotHubException e)
e - the reason why authentication failed.public void onAuthenticationSucceeded()
Copyright © 2022. All rights reserved.