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 |
AMQPS_PORT, AMQPS_WS_PORT, connectionOpenedRemotely, hostName, iotHubServiceClientProtocol, linkOpenedRemotely, sasToken, savedException, sessionOpenedRemotely, userName, WEBSOCKET_PATH, WEBSOCKET_SUB_PROTOCOL, webSocketHostName| Constructor and Description |
|---|
AmqpSendHandler(String hostName,
String userName,
String sasToken,
IotHubServiceClientProtocol iotHubServiceClientProtocol)
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 |
onConnectionInit(org.apache.qpid.proton.engine.Event event)
Event handler for the connection init event
|
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 |
onLinkInit(org.apache.qpid.proton.engine.Event event)
Event handler for the link init event
|
void |
verifySendSucceeded() |
onConnectionBound, onConnectionRemoteOpen, onLinkRemoteOpen, onReactorInit, onSessionRemoteOpen, verifyConnectionWasOpenedonConnectionLocalClose, onConnectionLocalOpen, onLinkLocalClose, onLinkLocalOpen, onLinkRemoteClose, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onTransportErroradd, children, getHandler, getHandler, handle, onConnectionFinal, onConnectionUnbound, onLinkFinal, 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 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 onConnectionInit(org.apache.qpid.proton.engine.Event event)
onConnectionInit in interface org.apache.qpid.proton.engine.CoreHandleronConnectionInit in class org.apache.qpid.proton.engine.BaseHandlerevent - The proton event objectpublic void onLinkInit(org.apache.qpid.proton.engine.Event event)
onLinkInit in interface org.apache.qpid.proton.engine.CoreHandleronLinkInit in class org.apache.qpid.proton.engine.BaseHandlerevent - The proton event objectpublic 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
IotHubExceptionIOExceptionCopyright © 2020. All rights reserved.