C# Класс Amqp.Listener.ListenerLink

The listener link provides non-blocking methods that can be used by brokers/listener applications.
Наследование: Link
Показать файл Открыть проект Примеры использования класса

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

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

Completes the link attach request. This should be called when the IContainer.AttachLink implementation returns false and the asynchrounous processing completes.

DisposeMessage ( Message message, Amqp.Framing.DeliveryState deliveryState, bool settled ) : void

Sends a disposition for the message.

InitializeReceiver ( uint credit, Action onMessage, object state ) : void

Initializes the receiver state for the link.

InitializeSender ( object>.Action onCredit, Action onDispose, object state ) : void

Initializes the sender state for the link.

ListenerLink ( Amqp.Listener.ListenerSession session, Amqp.Framing.Attach attach ) : System

Initializes a listener link object.

SendMessage ( Message message ) : void

Sends a message. This call is non-blocking and it does not wait for acknowledgements.

SendMessage ( Message message, System.ByteBuffer buffer ) : void

Sends a message with an optional buffer as the message payload.

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

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

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

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

Aborts the link.

OnClose ( Error error ) : bool

Closes the link.

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

Метод Описание
DeliverMessage ( Delivery delivery ) : void
InitializeLinkEndpoint ( Amqp.Listener.LinkEndpoint linkEndpoint, uint credit ) : void
OnAttach ( uint remoteHandle, Amqp.Framing.Attach attach ) : void
OnDeliveryStateChanged ( Delivery delivery ) : void
OnFlow ( Amqp.Framing.Flow flow ) : void
OnTransfer ( Delivery delivery, Amqp.Framing.Transfer transfer, System.ByteBuffer buffer ) : void
ThrowIfNotNull ( object obj, string name ) : void

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

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

Completes the link attach request. This should be called when the IContainer.AttachLink implementation returns false and the asynchrounous processing completes.
public CompleteAttach ( Amqp.Framing.Attach attach, Error error ) : void
attach Amqp.Framing.Attach The attach to send back.
error Error The error, if any, for the link.
Результат void

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

Sends a disposition for the message.
public DisposeMessage ( Message message, Amqp.Framing.DeliveryState deliveryState, bool settled ) : void
message Message The message to be disposed (a disposition performative will be sent for this message).
deliveryState Amqp.Framing.DeliveryState The delivery state to set on disposition.
settled bool The settled flag on disposition.
Результат void

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

Initializes the receiver state for the link.
public InitializeReceiver ( uint credit, Action onMessage, object state ) : void
credit uint The link credit to send to the peer.
onMessage Action The callback to be invoked for received messages.
state object The user state attached to the link.
Результат void

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

Initializes the sender state for the link.
public InitializeSender ( object>.Action onCredit, Action onDispose, object state ) : void
onCredit object>.Action The callback to be invoked when delivery limit changes (by received flow performatives).
onDispose Action The callback to be invoked when disposition is received.
state object The user state attached to the link.
Результат void

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

Initializes a listener link object.
public ListenerLink ( Amqp.Listener.ListenerSession session, Amqp.Framing.Attach attach ) : System
session Amqp.Listener.ListenerSession The session.
attach Amqp.Framing.Attach The received attach frame.
Результат System

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

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

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

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

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

Sends a message. This call is non-blocking and it does not wait for acknowledgements.
public SendMessage ( Message message ) : void
message Message
Результат void

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

Sends a message with an optional buffer as the message payload.
public SendMessage ( Message message, System.ByteBuffer buffer ) : void
message Message The message to be sent.
buffer System.ByteBuffer The serialized buffer of the message. It is null, the message is serialized.
Результат 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 drain, bool autoRestore = true ) : void
credit int The new link credit.
drain bool Sets the drain flag in the flow performative.
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