Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver Class Referencesealed

Implements the streaming message receiver which allows for reading of large messages in smaller chunks. The API allows for multiple calls to receiver but any call that happens after a large message receives begins will be blocked until the previous large message is fully read and the next arrives. More...

Inheritance diagram for Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver:
Apache.Qpid.Proton.Client.Implementation.ClientReceiverLinkType< IStreamReceiver > Apache.Qpid.Proton.Client.IStreamReceiver Apache.Qpid.Proton.Client.ILink< IStreamReceiver >

Public Member Functions

IStreamDelivery Receive ()
 Blocking receive method that waits forever for the remote to provide some or all of a delivery for consumption. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
IStreamDelivery TryReceive ()
 Non-blocking receive method that either returns a delivery is one is immediately available or returns null if none is currently at hand. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
IStreamDelivery Receive (TimeSpan timeout)
 Blocking receive method that waits for the specified time period for the remote to provide a delivery for consumption before returning null if none was received. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
Task< IStreamDeliveryReceiveAsync ()
 Asynchronous receive method that waits forever for the remote to provide a delivery for consumption and when a delivery is available the returned Task will be completed. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
Task< IStreamDeliveryTryReceiveAsync ()
 Asynchronous receive method that returns a Task which will be completed either with a currently available delivery or with null to indicate there are no queued deliveries. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
Task< IStreamDeliveryReceiveAsync (TimeSpan timeout)
 Asynchronous receive method that returns a Task that will be completed after the specified time period if the remote to provides a delivery for consumption before completing with null if none was received. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.
 
- Public Member Functions inherited from Apache.Qpid.Proton.Client.Implementation.ClientReceiverLinkType< IStreamReceiver >
LinkType AddCredit (uint credit)
 
Task< LinkType > AddCreditAsync (uint credit)
 
LinkType Drain ()
 
Task< LinkType > DrainAsync ()
 
- Public Member Functions inherited from Apache.Qpid.Proton.Client.IStreamReceiver
IStreamReceiver AddCredit (uint credit)
 Adds credit to the Receiver link for use when there receiver has not been configured with with a credit window. When credit window is configured credit replenishment is automatic and calling this method will result in an exception indicating that the operation is invalid.
 
Task< IStreamReceiverAddCreditAsync (uint credit)
 Asynchronously Adds credit to the Receiver link for use when there receiver has not been configured with with a credit window. When credit window is configured credit replenishment is automatic and calling this method will result in an exception indicating that the operation is invalid.
 
IStreamReceiver Drain ()
 Requests the remote to drain previously granted credit for this receiver link. The remote will either send all available deliveries up to the currently granted link credit or will report it has none to send an link credit will be set to zero. This method will block until the remote answers the drain request or the configured drain timeout expires.
 
Task< IStreamReceiverDrainAsync ()
 Requests the remote to drain previously granted credit for this receiver link. The remote will either send all available deliveries up to the currently granted link credit or will report it has none to send an link credit will be set to zero. The caller can wait on the returned task which will be signalled either after the remote reports drained or once the configured drain timeout is reached.
 

Properties

override IStreamReceiver Self [get]
 
- Properties inherited from Apache.Qpid.Proton.Client.Implementation.ClientReceiverLinkType< IStreamReceiver >
virtual int QueuedDeliveries [get]
 
LinkType Self [get]
 
- Properties inherited from Apache.Qpid.Proton.Client.IStreamReceiver
int QueuedDeliveries [get]
 A count of the currently queued deliveries which can be read immediately without blocking a call to receive.
 

Additional Inherited Members

- Protected Member Functions inherited from Apache.Qpid.Proton.Client.Implementation.ClientReceiverLinkType< IStreamReceiver >
void AsyncApplyDisposition (IIncomingDelivery delivery, Types.Transport.IDeliveryState state, bool settle)
 
void AsyncReplenishCreditIfNeeded ()
 
virtual void ReplenishCreditIfNeeded ()
 
- Protected Attributes inherited from Apache.Qpid.Proton.Client.Implementation.ClientReceiverLinkType< IStreamReceiver >
TaskCompletionSource< LinkType > drainingFuture
 
readonly ReceiverOptions options
 
readonly string receiverId
 

Detailed Description

Implements the streaming message receiver which allows for reading of large messages in smaller chunks. The API allows for multiple calls to receiver but any call that happens after a large message receives begins will be blocked until the previous large message is fully read and the next arrives.

Member Function Documentation

◆ Receive() [1/2]

IStreamDelivery Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.Receive ( )
inline

Blocking receive method that waits forever for the remote to provide some or all of a delivery for consumption. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Receive calls will only grant credit on their own if a credit window is configured in the options which by default will have been configured. If the client application has not configured a credit window then this method won't grant or extend the credit window but will wait for a delivery regardless. The application needs to arrange for credit to be granted in that case.

Returns
The next available delivery

Implements Apache.Qpid.Proton.Client.IStreamReceiver.

◆ Receive() [2/2]

IStreamDelivery Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.Receive ( TimeSpan  timeout)
inline

Blocking receive method that waits for the specified time period for the remote to provide a delivery for consumption before returning null if none was received. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Receive calls will only grant credit on their own if a credit window is configured in the options which by default will have been configured. If the client application has not configured a credit window then this method won't grant or extend the credit window but will wait for a delivery regardless. The application needs to arrange for credit to be granted in that case.

Implements Apache.Qpid.Proton.Client.IStreamReceiver.

◆ ReceiveAsync() [1/2]

Task< IStreamDelivery > Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.ReceiveAsync ( )
inline

Asynchronous receive method that waits forever for the remote to provide a delivery for consumption and when a delivery is available the returned Task will be completed. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Receive calls will only grant credit on their own if a credit window is configured in the options which by default will have been configured. If the client application has not configured a credit window then this method won't grant or extend the credit window but will wait for a delivery regardless. The application needs to arrange for credit to be granted in that case.

Returns
The next available delivery

Implements Apache.Qpid.Proton.Client.IStreamReceiver.

◆ ReceiveAsync() [2/2]

Task< IStreamDelivery > Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.ReceiveAsync ( TimeSpan  timeout)
inline

Asynchronous receive method that returns a Task that will be completed after the specified time period if the remote to provides a delivery for consumption before completing with null if none was received. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Receive calls will only grant credit on their own if a credit window is configured in the options which by default will have been configured. If the client application has not configured a credit window then this method won't grant or extend the credit window but will wait for a delivery regardless. The application needs to arrange for credit to be granted in that case.

Returns
The next available delivery or null if the time span elapses

Implements Apache.Qpid.Proton.Client.IStreamReceiver.

◆ TryReceive()

IStreamDelivery Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.TryReceive ( )
inline

Non-blocking receive method that either returns a delivery is one is immediately available or returns null if none is currently at hand. This method returns a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Returns
A delivery if one is immediately available or null if not

Implements Apache.Qpid.Proton.Client.IStreamReceiver.

◆ TryReceiveAsync()

Task< IStreamDelivery > Apache.Qpid.Proton.Client.Implementation.ClientStreamReceiver.TryReceiveAsync ( )
inline

Asynchronous receive method that returns a Task which will be completed either with a currently available delivery or with null to indicate there are no queued deliveries. The returned task completes with a streamed delivery instance that allows for consumption or the incoming delivery as it arrives.

Returns
A Task that completes with a delivery if one is immediately available or null if not

Implements Apache.Qpid.Proton.Client.IStreamReceiver.


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