AmqpDeviceOperations Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.device.transport.amqp.AmqpDeviceOperations

public class AmqpDeviceOperations

Field Summary

Modifier and Type Field and Description
String amqpLinkAddress

Constructor Summary

Constructor Description
AmqpDeviceOperations()

Constructor for Amqp Device Operations

Method Summary

Modifier and Type Method and Description
void addAmqpLinkProperty(String key, String value)
synchronized void closeLinks()

Close the links

synchronized void initLink(Link link)

Initializes the link's other endpoint according to its type

synchronized boolean isReceiverLinkTag(String name)

Is this name a receiver Link

void openLinks(Session session)

Open the Session links for session

AmqpMessage receiverMessageFromLink(String linkName)

Retrieves a message from a link

void sendMessage(byte[] tag, byte[] data, int length, int offset)

Sends a Message on the senderLink

Field Details

amqpLinkAddress

protected String amqpLinkAddress

Constructor Details

AmqpDeviceOperations

public AmqpDeviceOperations()

Constructor for Amqp Device Operations

Method Details

addAmqpLinkProperty

protected void addAmqpLinkProperty(String key, String value)

Parameters:

key
value

closeLinks

public synchronized void closeLinks()

Close the links

initLink

public synchronized void initLink(Link link)

Initializes the link's other endpoint according to its type

Parameters:

link - The link which shall be initialize.

Throws:

IllegalArgumentException - if link argument is null

isReceiverLinkTag

public synchronized boolean isReceiverLinkTag(String name)

Is this name a receiver Link

Parameters:

name - Name of the link

Returns:

if this is a receiver link

openLinks

public void openLinks(Session session)

Open the Session links for session

Parameters:

session - the Session endpoint.

Throws:

IllegalArgumentException -

if the session isnull 

</code> . </p>

receiverMessageFromLink

public AmqpMessage receiverMessageFromLink(String linkName)

Retrieves a message from a link

Parameters:

linkName - The name of the link to receive

Returns:

The Amqp Message from the specified link

sendMessage

public void sendMessage(byte[] tag, byte[] data, int length, int offset)

Sends a Message on the senderLink

Parameters:

tag - delivery tag
data - Data to be sent on the link
length - Length of the data
offset - Offset of the data to send

Applies to