C# Класс Amqp.ReceiverLink

The ReceiverLink class represents a link that accepts incoming messages.
Наследование: Link
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Accept ( Amqp.Message message ) : void

Accepts a message. It sends an accepted outcome to the peer.

Receive ( int timeout = 60000 ) : Amqp.Message

Receives a message. The call is blocked for the timeout in seconds or a message is available.

ReceiverLink ( Session session, string name, Amqp.Framing.Attach attach, OnAttached onAttached ) : System.Threading

Initializes a receiver link.

ReceiverLink ( Session session, string name, Amqp.Framing.Source source, OnAttached onAttached ) : System.Threading

Initializes a receiver link.

ReceiverLink ( Session session, string name, string adderss ) : System.Threading

Initializes a receiver link.

Reject ( Amqp.Message message, Amqp.Framing.Error error = null ) : void

Rejects a message. It sends a rejected outcome to the peer.

Release ( Amqp.Message message ) : void

Releases a message. It sends a released outcome to the peer.

SetCredit ( int credit, bool autoRestore = true ) : void

Sets a credit on the link. A flow is sent to the peer to update link flow control state.

Start ( int credit, MessageCallback onMessage = null ) : void

Starts the message pump.

Защищенные методы

Метод Описание
OnAbort ( Amqp.Framing.Error error ) : void

Aborts the receiver link.

OnClose ( Amqp.Framing.Error error ) : bool

Closes the receiver link.

Приватные методы

Метод Описание
DisposeMessage ( Amqp.Message message, Amqp.Framing.Outcome outcome ) : void
OnAttach ( uint remoteHandle, Amqp.Framing.Attach attach ) : void
OnDeliverMessage ( ) : void
OnDelivery ( Amqp.SequenceNumber deliveryId ) : void
OnDeliveryStateChanged ( Amqp.Delivery delivery ) : void
OnFlow ( Amqp.Framing.Flow flow ) : void
OnTransfer ( Amqp.Delivery delivery, Amqp.Framing.Transfer transfer, ByteBuffer buffer ) : void
ReceiveInternal ( MessageCallback callback, int timeout = 60000 ) : Amqp.Message

Описание методов

Accept() публичный Метод

Accepts a message. It sends an accepted outcome to the peer.
public Accept ( Amqp.Message message ) : void
message Amqp.Message The message to accept.
Результат void

OnAbort() защищенный Метод

Aborts the receiver link.
protected OnAbort ( Amqp.Framing.Error error ) : void
error Amqp.Framing.Error The error for the abort.
Результат void

OnClose() защищенный Метод

Closes the receiver link.
protected OnClose ( Amqp.Framing.Error error ) : bool
error Amqp.Framing.Error The error for the closure.
Результат bool

Receive() публичный Метод

Receives a message. The call is blocked for the timeout in seconds or a message is available.
public Receive ( int timeout = 60000 ) : Amqp.Message
timeout int Number of seconds to wait.
Результат Amqp.Message

ReceiverLink() публичный Метод

Initializes a receiver link.
public ReceiverLink ( Session session, string name, Amqp.Framing.Attach attach, OnAttached onAttached ) : System.Threading
session Session The session within which to create the link.
name string The link name.
attach Amqp.Framing.Attach The attach frame to send for this link.
onAttached OnAttached The callback to invoke when an attach is received from peer.
Результат System.Threading

ReceiverLink() публичный Метод

Initializes a receiver link.
public ReceiverLink ( Session session, string name, Amqp.Framing.Source source, OnAttached onAttached ) : System.Threading
session Session The session within which to create the link.
name string The link name.
source Amqp.Framing.Source The source on attach that specifies the message source.
onAttached OnAttached The callback to invoke when an attach is received from peer.
Результат System.Threading

ReceiverLink() публичный Метод

Initializes a receiver link.
public ReceiverLink ( Session session, string name, string adderss ) : System.Threading
session Session The session within which to create the link.
name string The link name.
adderss string The node address.
Результат System.Threading

Reject() публичный Метод

Rejects a message. It sends a rejected outcome to the peer.
public Reject ( Amqp.Message message, Amqp.Framing.Error error = null ) : void
message Amqp.Message The message to reject.
error Amqp.Framing.Error The error, if any, for the rejection.
Результат void

Release() публичный Метод

Releases a message. It sends a released outcome to the peer.
public Release ( Amqp.Message message ) : void
message Amqp.Message The message to release.
Результат void

SetCredit() публичный Метод

Sets a credit on the link. A flow is sent to the peer to update link flow control state.
public SetCredit ( int credit, bool autoRestore = true ) : void
credit int The new link credit.
autoRestore bool If true, link credit is auto-restored when a message is accepted/rejected by the caller. If false, caller is responsible for manage link credits.
Результат void

Start() публичный Метод

Starts the message pump.
public Start ( int credit, MessageCallback onMessage = null ) : void
credit int The link credit to issue.
onMessage MessageCallback If specified, the callback to invoke when messages are received. If not specified, call Receive method to get the messages.
Результат void