Proton DotNet
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver Class Reference

Proton Receiver link implementation which manages the receipt of new deliveries and credit associated with the link. Delivery outcomes and settlement states can also be managed from the receiver link. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver:
Apache.Qpid.Proton.Engine.Implementation.ProtonLink< IReceiver > Apache.Qpid.Proton.Engine.IReceiver Apache.Qpid.Proton.Engine.ILink< IReceiver >

Public Member Functions

 ProtonReceiver (ProtonSession session, string name, ProtonLinkCreditState creditState)
 
IReceiver AddCredit (uint amount)
 Adds the given amount of credit to the receiver's already existing credit if any. More...
 
bool Drain ()
 Initiate a drain of all remaining credit of this link, the remote sender will then either send enough deliveries to fulfill the drain request or report that it cannot and all remaining link credit will be consumed. More...
 
bool Drain (uint credits)
 Initiate a drain of the given credit from this this receiver} link. If the credit given is greater than the current link credit the current credit is increased, however if the amount of credit given is less that the current amount of link credit an exception is thrown. More...
 
IReceiver Settle (Predicate< IIncomingDelivery > filter)
 For each unsettled outgoing delivery that is pending in the receiver apply the given predicate and if it matches then settle the delivery. More...
 
IReceiver Disposition (Predicate< IIncomingDelivery > filter, IDeliveryState state, bool settle)
 For each unsettled outgoing delivery that is pending in the receiver apply the given predicate and if it matches then apply the given delivery state and settled value to it. More...
 
IReceiver DeliveryAbortedHandler (Action< IIncomingDelivery > handler)
 Handler for aborted deliveries that is called for each aborted in-progress delivery. This handler is an optional convenience handler that supplements the standard delivery read event handler in cases where the users wishes to break out the processing of inbound delivery data from abort processing. If this handler is not set the receiver will call the registered delivery read handler if one is set. More...
 
IReceiver DeliveryReadHandler (Action< IIncomingDelivery > handler)
 Handler for incoming deliveries that is called for each incoming transfer frame that comprises either one complete delivery or a chunk of a split framed transfer. The handler should check that the delivery being read is partial or not and act accordingly, as partial deliveries expect additional updates as more frames comprising that delivery arrive or the remote aborts the transfer. More...
 
IReceiver DeliveryStateUpdatedHandler (Action< IIncomingDelivery > handler)
 Handler for updates to the remote state of incoming deliveries that have previously been received. Remote state updates for an previously received delivery can happen when the remote settles a complete delivery or otherwise modifies the delivery outcome and the user needs to act on those changes such as a spontaneous update to the delivery state. More...
 

Public Attributes

override uint Credit => CreditState.Credit
 
override bool IsDraining => drainStateSnapshot != null
 
override Role Role => Role.Receiver
 
bool HasUnsettled => unsettled.Count > 0
 
IReadOnlyCollection< IIncomingDeliveryUnsettled => new List<IIncomingDelivery>(unsettled.Values)
 

Protected Member Functions

override void HandleRemoteAttach (Attach attach)
 
override void HandleRemoteDetach (Detach detach)
 
override void HandleRemoteFlow (Flow flow)
 
override void HandleRemoteDisposition (Disposition disposition, ProtonOutgoingDelivery delivery)
 
override void HandleRemoteDisposition (Disposition disposition, ProtonIncomingDelivery delivery)
 
override void HandleRemoteTransfer (Transfer transfer, IProtonBuffer payload, out ProtonIncomingDelivery delivery)
 
override void HandleDecorateOfOutgoingFlow (Flow flow)
 
override void HandleSessionCreditStateUpdates (in ProtonSessionOutgoingWindow window)
 
override void HandleSessionCreditStateUpdates (in ProtonSessionIncomingWindow window)
 

Properties

IDeliveryState DefaultDeliveryState [get, set]
 
- Properties inherited from Apache.Qpid.Proton.Engine.IReceiver
IDeliveryState DefaultDeliveryState [get, set]
 Configures a default DeliveryState to be used if a received delivery is settled/freed without any disposition state having been previously applied. More...
 
IReadOnlyCollection< IIncomingDeliveryUnsettled [get]
 Retrieves the list of unsettled deliveries sent from this receiver. The deliveries in the enumerator cannot be written to but can have their settled state and disposition updated. Only when this receiver settles on its end are the outgoing delivery instances removed from the unsettled tracking. More...
 
bool HasUnsettled [get]
 Returns true if the receiver link is tracking any unsettled sent deliveries. More...
 

Additional Inherited Members

Detailed Description

Proton Receiver link implementation which manages the receipt of new deliveries and credit associated with the link. Delivery outcomes and settlement states can also be managed from the receiver link.

Member Function Documentation

◆ AddCredit()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.AddCredit ( uint  amount)
inline

Adds the given amount of credit to the receiver's already existing credit if any.

Parameters
amountThe amount of credit to add to the existing credit
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ DeliveryAbortedHandler()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.DeliveryAbortedHandler ( Action< IIncomingDelivery handler)
inline

Handler for aborted deliveries that is called for each aborted in-progress delivery. This handler is an optional convenience handler that supplements the standard delivery read event handler in cases where the users wishes to break out the processing of inbound delivery data from abort processing. If this handler is not set the receiver will call the registered delivery read handler if one is set.

Parameters
handlerA delegate that will handle this event
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ DeliveryReadHandler()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.DeliveryReadHandler ( Action< IIncomingDelivery handler)
inline

Handler for incoming deliveries that is called for each incoming transfer frame that comprises either one complete delivery or a chunk of a split framed transfer. The handler should check that the delivery being read is partial or not and act accordingly, as partial deliveries expect additional updates as more frames comprising that delivery arrive or the remote aborts the transfer.

Parameters
handlerA delegate that will handle this event
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ DeliveryStateUpdatedHandler()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.DeliveryStateUpdatedHandler ( Action< IIncomingDelivery handler)
inline

Handler for updates to the remote state of incoming deliveries that have previously been received. Remote state updates for an previously received delivery can happen when the remote settles a complete delivery or otherwise modifies the delivery outcome and the user needs to act on those changes such as a spontaneous update to the delivery state.

Parameters
handlerA delegate that will handle this event
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ Disposition()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.Disposition ( Predicate< IIncomingDelivery filter,
IDeliveryState  state,
bool  settle 
)
inline

For each unsettled outgoing delivery that is pending in the receiver apply the given predicate and if it matches then apply the given delivery state and settled value to it.

Parameters
filterThe filter predicate that controls when disposition is applied
stateThe delivery state to apply when the predicate matches
settleShould the delivery be settled when the predicate matches.
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ Drain() [1/2]

bool Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.Drain ( )
inline

Initiate a drain of all remaining credit of this link, the remote sender will then either send enough deliveries to fulfill the drain request or report that it cannot and all remaining link credit will be consumed.

Returns
True if a drain request was started or false if no credit exists
Exceptions
InvalidOperationExceptionIf a drain is already in progress

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ Drain() [2/2]

bool Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.Drain ( uint  credit)
inline

Initiate a drain of the given credit from this this receiver} link. If the credit given is greater than the current link credit the current credit is increased, however if the amount of credit given is less that the current amount of link credit an exception is thrown.

Parameters
creditThe amount of credit to drain
Returns
True if a drain request was started or false if no credit exists
Exceptions
InvalidOperationExceptionIf a drain is already in progress

Implements Apache.Qpid.Proton.Engine.IReceiver.

◆ Settle()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonReceiver.Settle ( Predicate< IIncomingDelivery filter)
inline

For each unsettled outgoing delivery that is pending in the receiver apply the given predicate and if it matches then settle the delivery.

Parameters
filter
Returns
This receiver instance

Implements Apache.Qpid.Proton.Engine.IReceiver.


The documentation for this class was generated from the following file: