AmqpConnectionHandler Class
- java.
lang. Object - org.
apache. qpid. proton. engine. BaseHandler - com.
microsoft. azure. sdk. iot. deps. transport. amqp. ErrorLoggingBaseHandler - com.
microsoft. azure. sdk. iot. deps. transport. amqp. ErrorLoggingBaseHandlerWithCleanup - com.
microsoft. azure. sdk. iot. service. transport. amqps. AmqpConnectionHandler
- com.
- com.
- com.
- org.
Implements
public abstract class AmqpConnectionHandler
extends ErrorLoggingBaseHandlerWithCleanup
implements com.microsoft.azure.sdk.iot.service.transport.amqps.CbsSessionStateCallback
Field Summary
Modifier and Type | Field and Description |
---|---|
protected org.apache.qpid.proton.engine.Connection | connection |
protected final java.lang.String | hostName |
protected
Iot |
iotHubServiceClientProtocol |
protected
Proxy |
proxyOptions |
protected java.lang.String | sasToken |
protected javax.net.ssl.SSLContext | sslContext |
protected java.lang.String | userName |
Constructor Summary
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
onAuthenticationFailed(IotHubException e)
Executes when the CBS session has failed to authenticate the connection |
void |
onConnectionBound(Event event)
Event handler for the connection bound event |
void | onConnectionInit(Event event) |
void | onConnectionRemoteOpen(Event event) |
void | onLinkRemoteOpen(Event event) |
void | onReactorInit(Event event) |
void | onSessionRemoteOpen(Event event) |
protected void |
verifyConnectionWasOpened()
If an exception was encountered while opening the AMQP connection, this function shall throw that saved exception |
Methods inherited from ErrorLoggingBaseHandlerWithCleanup
Methods inherited from java.lang.Object
Methods inherited from org.apache.qpid.proton.engine.BaseHandler
Field Details
connection
protected Connection connection
hostName
protected final String hostName
iotHubServiceClientProtocol
protected IotHubServiceClientProtocol iotHubServiceClientProtocol
proxyOptions
protected ProxyOptions proxyOptions
sasToken
protected String sasToken
sslContext
protected SSLContext sslContext
userName
protected String userName
Constructor Details
AmqpConnectionHandler
protected AmqpConnectionHandler(String hostName, AzureSasCredential sasTokenProvider, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
Parameters:
AmqpConnectionHandler
protected AmqpConnectionHandler(String hostName, TokenCredential credential, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
Parameters:
AmqpConnectionHandler
protected AmqpConnectionHandler(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
Parameters:
Method Details
onAuthenticationFailed
public void onAuthenticationFailed(IotHubException e)
Executes when the CBS session has failed to authenticate the connection
Parameters:
onConnectionBound
public void onConnectionBound(Event event)
Event handler for the connection bound event
Overrides:
AmqpConnectionHandler.onConnectionBound(Event event)Parameters:
onConnectionInit
public void onConnectionInit(Event event)
Overrides:
AmqpConnectionHandler.onConnectionInit(Event event)Parameters:
onConnectionRemoteOpen
public void onConnectionRemoteOpen(Event event)
Overrides:
AmqpConnectionHandler.onConnectionRemoteOpen(Event event)Parameters:
onLinkRemoteOpen
public void onLinkRemoteOpen(Event event)
Overrides:
AmqpConnectionHandler.onLinkRemoteOpen(Event event)Parameters:
onReactorInit
public void onReactorInit(Event event)
Overrides:
AmqpConnectionHandler.onReactorInit(Event event)Parameters:
onSessionRemoteOpen
public void onSessionRemoteOpen(Event event)
Overrides:
AmqpConnectionHandler.onSessionRemoteOpen(Event event)Parameters:
verifyConnectionWasOpened
protected void verifyConnectionWasOpened()
If an exception was encountered while opening the AMQP connection, this function shall throw that saved exception
Throws:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for