public class AmqpSendHandler extends AmqpConnectionHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
DEVICE_PATH_FORMAT |
static String |
ENDPOINT |
static String |
MODULE_PATH_FORMAT |
static String |
SEND_TAG |
connection, hostName, iotHubServiceClientProtocol, proxyOptions, sasToken, sslContext, userName| Constructor and Description |
|---|
AmqpSendHandler(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol)
Constructor to set up connection parameters and initialize handshaker for transport
|
AmqpSendHandler(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
ProxyOptions proxyOptions)
Constructor to set up connection parameters and initialize handshaker for transport
|
AmqpSendHandler(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol,
ProxyOptions proxyOptions,
SSLContext sslContext)
Constructor to set up connection parameters and initialize handshaker for transport
|
| Modifier and Type | Method and Description |
|---|---|
void |
createProtonMessage(String deviceId,
Message message)
Create Proton message from deviceId and content string
|
void |
createProtonMessage(String deviceId,
String moduleId,
Message message)
Create Proton message from deviceId and content string
|
void |
onAuthenticationSucceeded() |
void |
onConnectionRemoteClose(org.apache.qpid.proton.engine.Event event) |
void |
onDelivery(org.apache.qpid.proton.engine.Event event) |
void |
onLinkFlow(org.apache.qpid.proton.engine.Event event)
Event handler for the link flow event
|
void |
verifySendSucceeded() |
getConnectionId, onAuthenticationFailed, onConnectionBound, onConnectionInit, onConnectionRemoteOpen, onLinkRemoteOpen, onReactorInit, onSessionRemoteOpen, verifyConnectionWasOpenedonConnectionLocalClose, onConnectionLocalOpen, onLinkLocalClose, onLinkLocalOpen, onLinkRemoteClose, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onTransportErroradd, children, getHandler, getHandler, handle, onConnectionFinal, onConnectionUnbound, onLinkFinal, onLinkInit, onLinkLocalDetach, onLinkRemoteDetach, onReactorFinal, onReactorQuiesced, onSelectableError, onSelectableExpired, onSelectableFinal, onSelectableInit, onSelectableReadable, onSelectableUpdated, onSelectableWritable, onSessionFinal, onSessionInit, onTimerTask, onTransport, onTransportClosed, onTransportHeadClosed, onTransportTailClosed, onUnhandled, setHandler, setHandlerpublic static final String SEND_TAG
public static final String ENDPOINT
public static final String DEVICE_PATH_FORMAT
public static final String MODULE_PATH_FORMAT
public AmqpSendHandler(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol)
hostName - The address string of the service (example: AAA.BBB.CCC)userName - The username string to use SASL authentication (example: user@sas.service)sasToken - The SAS token stringiotHubServiceClientProtocol - protocol to usepublic AmqpSendHandler(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions)
hostName - The address string of the service (example: AAA.BBB.CCC)userName - The username string to use SASL authentication (example: user@sas.service)sasToken - The SAS token stringiotHubServiceClientProtocol - protocol to useproxyOptions - the proxy options to tunnel through, if a proxy should be used.public AmqpSendHandler(String hostName, String userName, String sasToken, IotHubServiceClientProtocol iotHubServiceClientProtocol, ProxyOptions proxyOptions, SSLContext sslContext)
hostName - The address string of the service (example: AAA.BBB.CCC)userName - The username string to use SASL authentication (example: user@sas.service)sasToken - The SAS token stringiotHubServiceClientProtocol - protocol to useproxyOptions - the proxy options to tunnel through, if a proxy should be used.sslContext - the SSL context to use during the TLS handshake when opening the connection. If null, a default
SSL context will be generated. This default SSLContext trusts the IoT Hub public certificates.public void createProtonMessage(String deviceId, Message message)
deviceId - The device name stringmessage - The message to be sentpublic void createProtonMessage(String deviceId, String moduleId, Message message)
deviceId - The device name stringmoduleId - The device name stringmessage - The message to be sentpublic void onLinkFlow(org.apache.qpid.proton.engine.Event event)
onLinkFlow in interface org.apache.qpid.proton.engine.CoreHandleronLinkFlow in class org.apache.qpid.proton.engine.BaseHandlerevent - The proton event objectpublic void onDelivery(org.apache.qpid.proton.engine.Event event)
onDelivery in interface org.apache.qpid.proton.engine.CoreHandleronDelivery in class org.apache.qpid.proton.engine.BaseHandlerpublic void onConnectionRemoteClose(org.apache.qpid.proton.engine.Event event)
onConnectionRemoteClose in interface org.apache.qpid.proton.engine.CoreHandleronConnectionRemoteClose in class com.microsoft.azure.sdk.iot.deps.transport.amqp.ErrorLoggingBaseHandlerWithCleanuppublic void verifySendSucceeded()
throws IotHubException,
IOException
IotHubExceptionIOExceptionpublic void onAuthenticationSucceeded()
Copyright © 2022. All rights reserved.