Show / Hide Table of Contents

Class SenderLink

The SenderLink represents a link that sends outgoing messages.

Inheritance
System.Object
AmqpObject
Link
SenderLink
Implements
ISenderLink
ILink
IAmqpObject
Inherited Members
Link.DetachAsync(Error)
Link.Name
Link.Handle
Link.Session
Link.LinkState
Link.Detach(Error)
AmqpObject.Closed
AmqpObject.Error
AmqpObject.IsClosed
AmqpObject.AddClosedCallback(ClosedCallback)
AmqpObject.Close()
AmqpObject.Close(TimeSpan, Error)
AmqpObject.CloseAsync()
AmqpObject.CloseAsync(TimeSpan, Error)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Amqp
Assembly: Amqp.Net.dll
Syntax
public class SenderLink : Link, ISenderLink, ILink, IAmqpObject

Constructors

SenderLink(Session, String, Attach, OnAttached)

Initializes a sender link.

Declaration
public SenderLink(Session session, string name, Attach attach, OnAttached onAttached)
Parameters
Type Name Description
Session session

The session within which to create the link.

System.String name

The link name.

Attach attach

The attach frame to send for this link.

OnAttached onAttached

The callback to invoke when an attach is received from peer.

SenderLink(Session, String, Target, OnAttached)

Initializes a sender link.

Declaration
public SenderLink(Session session, string name, Target target, OnAttached onAttached)
Parameters
Type Name Description
Session session

The session within which to create the link.

System.String name

The link name.

Target target

The target on attach that specifies the message target.

OnAttached onAttached

The callback to invoke when an attach is received from peer.

SenderLink(Session, String, String)

Initializes a sender link.

Declaration
public SenderLink(Session session, string name, string address)
Parameters
Type Name Description
Session session

The session within which to create the link.

System.String name

The link name.

System.String address

The node address.

Methods

OnAbort(Error)

Aborts the sender link.

Declaration
protected override void OnAbort(Error error)
Parameters
Type Name Description
Error error

The error for the abort.

Overrides
Link.OnAbort(Error)

OnClose(Error)

Closes the sender link.

Declaration
protected override bool OnClose(Error error)
Parameters
Type Name Description
Error error

The error for the closure.

Returns
Type Description
System.Boolean
Overrides
Link.OnClose(Error)

Send(Message)

Sends a message and synchronously waits for an acknowledgement. Throws TimeoutException if ack is not received in 60 seconds.

Declaration
public void Send(Message message)
Parameters
Type Name Description
Message message

The message to send.

Send(Message, DeliveryState, OutcomeCallback, Object)

Sends a message asynchronously. If callback is null, the message is sent without requesting for an acknowledgement (best effort). This method is not transaction aware. If you need transaction support, use Send(Message, OutcomeCallback, Object).

Declaration
public void Send(Message message, DeliveryState deliveryState, OutcomeCallback callback, object state)
Parameters
Type Name Description
Message message

The message to send.

DeliveryState deliveryState

The transactional state of the message. If null, no transaction is used.

OutcomeCallback callback

The callback to invoke when acknowledgement is received.

System.Object state

The object that is passed back to the outcome callback.

Send(Message, OutcomeCallback, Object)

Sends a message asynchronously. If callback is null, the message is sent without requesting for an acknowledgement (best effort).

Declaration
public void Send(Message message, OutcomeCallback callback, object state)
Parameters
Type Name Description
Message message

The message to send.

OutcomeCallback callback

The callback to invoke when acknowledgement is received.

System.Object state

The object that is passed back to the outcome callback.

Send(Message, TimeSpan)

Sends a message and synchronously waits for an acknowledgement. Throws TimeoutException if ack is not received in the specified time.

Declaration
public void Send(Message message, TimeSpan timeout)
Parameters
Type Name Description
Message message

The message to send.

System.TimeSpan timeout

The time to wait for the acknowledgement.

SendAsync(Message)

Sends a message asynchronously using a default timeout.

Declaration
public Task SendAsync(Message message)
Parameters
Type Name Description
Message message

The message to send.

Returns
Type Description
System.Threading.Tasks.Task

A Task for the asynchronous send operation.

SendAsync(Message, TimeSpan)

Sends a message asynchronously.

Declaration
public Task SendAsync(Message message, TimeSpan timeout)
Parameters
Type Name Description
Message message

The message to send.

System.TimeSpan timeout

The time to wait for the task to complete.

Returns
Type Description
System.Threading.Tasks.Task

A Task for the asynchronous send operation.

Implements

ISenderLink
ILink
IAmqpObject
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX