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

Proton Sender link implementation which manages the state of the Sender end of an attached link and provides resources for sending deliveries and managing the state of sent deliveries. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonSender:
Apache.Qpid.Proton.Engine.Implementation.ProtonLink< ISender > Apache.Qpid.Proton.Engine.ISender Apache.Qpid.Proton.Engine.ILink< ISender >

Public Member Functions

 ProtonSender (ProtonSession session, string name, ProtonLinkCreditState creditState)
 
ISender Drained ()
 Called when the remote receiver has requested a drain of credit and the sender has sent all available messages. More...
 
ISender Disposition (Predicate< IOutgoingDelivery > filter, IDeliveryState state, bool settle)
 For each unsettled outgoing delivery that is pending in the sender apply the given predicate and if it matches then apply the given delivery state and settled value to it. More...
 
ISender Settle (Predicate< IOutgoingDelivery > filter)
 For each unsettled outgoing delivery that is pending in the sender apply the given predicate and if it matches then settle the delivery. More...
 
IOutgoingDelivery Next ()
 When there has been no deliveries so far or the current delivery has reached a complete state this method updates the current delivery to a new instance and returns that value. If the current delivery has not been completed by either calling a completing API method then this method will throw an exception to indicate the sender state cannot allow a new delivery to be started. More...
 
ISender DeliveryStateUpdatedHandler (Action< IOutgoingDelivery > handler)
 Handler for updates for deliveries that have previously been sent. Updates can happen when the remote settles or otherwise modifies the delivery and the user needs to act on those changes. More...
 

Public Attributes

override Role Role => Role.Sender
 
override uint Credit => CreditState.Credit
 
bool IsSendable => sendable && sessionWindow.IsSendable
 
override bool IsDraining => CreditState.IsDrain
 
IOutgoingDelivery Current => current
 
bool HasUnsettled => unsettled.Count > 0
 
IReadOnlyCollection< IOutgoingDeliveryUnsettled => new List<IOutgoingDelivery>(unsettled.Values)
 

Protected Member Functions

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

Properties

IDeliveryTagGenerator DeliveryTagGenerator [get, set]
 
- Properties inherited from Apache.Qpid.Proton.Engine.ISender
bool IsSendable [get]
 Checks if the sender has credit and the session window allows for any bytes to be written currently. More...
 
IOutgoingDelivery Current [get]
 Gets the current outgoing delivery for this sender if one is available. The sender only tracks a current delivery in the case that the next method has bee called and if any bytes are written to the delivery using the streaming based API outgoing delivery stream bytes methods which allows for later writing of additional bytes to the delivery. Once the write bytes method or the complete API is called the final transfer is written indicating that the delivery is complete and the current delivery value is reset. An outgoing delivery that is being streamed may also be completed by calling the abort method of the outgoing delivery API. More...
 
IReadOnlyCollection< IOutgoingDeliveryUnsettled [get]
 Retrieves the list of unsettled deliveries sent from this sender. The deliveries in the enumerator cannot be written to but can have their settled state and disposition updated. Only when this sender settles on its end are the outgoing delivery instances removed from the unsettled tracking. More...
 
bool HasUnsettled [get]
 Returns true if the sender link is tracking any unsettled sent deliveries. More...
 
IDeliveryTagGenerator DeliveryTagGenerator [get, set]
 Configures a delivery tag generator that will be used to create and set a delivery tag value on each new outgoing delivery that is created and returned from the sender next delivery method. More...
 

Additional Inherited Members

Detailed Description

Proton Sender link implementation which manages the state of the Sender end of an attached link and provides resources for sending deliveries and managing the state of sent deliveries.

Member Function Documentation

◆ DeliveryStateUpdatedHandler()

ISender Apache.Qpid.Proton.Engine.Implementation.ProtonSender.DeliveryStateUpdatedHandler ( Action< IOutgoingDelivery handler)
inline

Handler for updates for deliveries that have previously been sent. Updates can happen when the remote settles or otherwise modifies the delivery and the user needs to act on those changes.

Parameters
handler
Returns

Implements Apache.Qpid.Proton.Engine.ISender.

◆ Disposition()

ISender Apache.Qpid.Proton.Engine.Implementation.ProtonSender.Disposition ( Predicate< IOutgoingDelivery filter,
IDeliveryState  state,
bool  settle 
)
inline

For each unsettled outgoing delivery that is pending in the sender 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

Implements Apache.Qpid.Proton.Engine.ISender.

◆ Drained()

ISender Apache.Qpid.Proton.Engine.Implementation.ProtonSender.Drained ( )
inline

Called when the remote receiver has requested a drain of credit and the sender has sent all available messages.

Returns
This sender instance
Exceptions
InvalidOperationExceptionIf the link is not draining.

Implements Apache.Qpid.Proton.Engine.ISender.

◆ Next()

IOutgoingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonSender.Next ( )
inline

When there has been no deliveries so far or the current delivery has reached a complete state this method updates the current delivery to a new instance and returns that value. If the current delivery has not been completed by either calling a completing API method then this method will throw an exception to indicate the sender state cannot allow a new delivery to be started.

Exceptions
InvalidOperationExceptionIf a current delivery is still incomplete

Implements Apache.Qpid.Proton.Engine.ISender.

◆ Settle()

ISender Apache.Qpid.Proton.Engine.Implementation.ProtonSender.Settle ( Predicate< IOutgoingDelivery filter)
inline

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

Parameters
filter
Returns

Implements Apache.Qpid.Proton.Engine.ISender.


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