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

Proton Incoming Delivery implementation that wraps all the details of managing the read of delivery payload and management of delivery state. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery:
Apache.Qpid.Proton.Engine.IIncomingDelivery

Public Member Functions

 ProtonIncomingDelivery (ProtonReceiver link, uint deliveryId, IDeliveryTag deliveryTag)
 
IIncomingDelivery Disposition (IDeliveryState state)
 Update the delivery with the given disposition if not locally settled.
 
IIncomingDelivery Disposition (IDeliveryState state, bool settled)
 Update the delivery with the given disposition if not locally settled and optionally settles the delivery if not already settled. Applies the given delivery state and local settlement value to this delivery writing a new disposition frame if the remote has not already settled the delivery. Once locally settled no additional updates to the local delivery state can be applied and if attempted an exception will be thrown to indicate this is not possible.
 
IIncomingDelivery Settle ()
 Settles this delivery locally, transmitting a disposition frame to the remote if the remote has not already settled the delivery. Once locally settled the delivery will not accept any additional updates to the delivery state via one of the disposition methods.
 
override string ToString ()
 
IProtonBuffer ReadAll ()
 Returns the current read buffer without copying it effectively consuming all currently available bytes from this delivery. If no data is available then this method returns null.
 
IIncomingDelivery ReadBytes (IProtonBuffer buffer)
 Reads bytes from this delivery and writes them into the destination buffer reducing the available bytes by the value of the number of bytes written to the target. The number of bytes written will be the equal to the writable bytes of the target buffer. The writable bytes of the target buffer will be decremented by the number of bytes written into it.
 
IIncomingDelivery ReadBytes (byte[] target, int offset, int length)
 Reads bytes from this delivery and writes them into the destination array starting at the given offset and continuing for the specified length reducing the available bytes by the value of the number of bytes written to the target.
 
IIncomingDelivery ClaimAvailableBytes ()
 Marks all available bytes as being claimed by the caller meaning that available byte count value can be returned to the session which can expand the session incoming window to allow more bytes to be sent from the remote peer. This method is useful in the case where the session has been configured with a small incoming capacity and the receiver needs to expand the session window in order to read the entire contents of a delivery whose payload exceeds the configured session capacity. The incoming delivery implementation will track the amount of claimed bytes and ensure that it never releases back more bytes to the session than has actually been received as a whole which allows this method to be called with each incoming transfer frame of a large split framed delivery.
 
IIncomingDelivery 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 delivery will call the registered delivery read handler if one is set.
 
IIncomingDelivery 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.
 
IIncomingDelivery 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.
 

Properties

IReceiver Receiver [get]
 Returns a reference to the parent receiver that read this delivery.
 
IAttachments Attachments [get]
 Access the attachments instance that allows callers to attach state data to an incoming delivery instance.
 
object LinkedResource [get, set]
 Allows the endpoint to have some user defined resource linked to it which can be used to store application state data or other associated object instances with this incoming delivery.
 
IDeliveryTag DeliveryTag [get]
 Access the delivery tag that the remote sender assigned to this incoming delivery.
 
IDeliveryState State [get]
 Access the delivery state assigned by the local end of this delivery.
 
IDeliveryState RemoteState [get, set]
 Access the delivery state assigned by the remote end of this delivery.
 
uint MessageFormat [get, set]
 Access the message-format for this Delivery, representing the 32bit value using an unsigned int. The default value is 0 as per the message format defined in the core AMQP 1.0 specification.
 
IDeliveryState DefaultDeliveryState [get, set]
 Configures a default delivery state to be used if a received delivery is settled/freed without any disposition state having been previously applied.
 
bool IsPartial [get]
 Checks if the delivery is partial or has been completed by the remote.
 
bool IsAborted [get]
 Checks if the delivery has been aborted by the remote sender.
 
bool IsSettled [get]
 Checks if the delivery has been settled locally.
 
bool IsRemotelySettled [get]
 Checks if the delivery has been settled by the remote.
 
uint TransferCount [get]
 Returns the total number of transfer frames that have occurred for this delivery so far.
 
long Available [get]
 Returns the number of bytes that are currently available for reading from this incoming delivery. Note that this value will change as bytes are received, and is in general not equal to the total length of a delivery until the point where the is partial check returns false and no content has yet been received by the application.
 
- Properties inherited from Apache.Qpid.Proton.Engine.IIncomingDelivery

Detailed Description

Proton Incoming Delivery implementation that wraps all the details of managing the read of delivery payload and management of delivery state.

Member Function Documentation

◆ ClaimAvailableBytes()

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.ClaimAvailableBytes ( )
inline

Marks all available bytes as being claimed by the caller meaning that available byte count value can be returned to the session which can expand the session incoming window to allow more bytes to be sent from the remote peer. This method is useful in the case where the session has been configured with a small incoming capacity and the receiver needs to expand the session window in order to read the entire contents of a delivery whose payload exceeds the configured session capacity. The incoming delivery implementation will track the amount of claimed bytes and ensure that it never releases back more bytes to the session than has actually been received as a whole which allows this method to be called with each incoming transfer frame of a large split framed delivery.

Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ DeliveryAbortedHandler()

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.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 delivery will call the registered delivery read handler if one is set.

Parameters
handlerA delegate that will handle this event
Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ DeliveryReadHandler()

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.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 incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ DeliveryStateUpdatedHandler()

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.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 incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ Disposition() [1/2]

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Disposition ( IDeliveryState  state)
inline

Update the delivery with the given disposition if not locally settled.

Parameters
stateThe delivery state to apply to this delivery
Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ Disposition() [2/2]

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Disposition ( IDeliveryState  state,
bool  settled 
)
inline

Update the delivery with the given disposition if not locally settled and optionally settles the delivery if not already settled. Applies the given delivery state and local settlement value to this delivery writing a new disposition frame if the remote has not already settled the delivery. Once locally settled no additional updates to the local delivery state can be applied and if attempted an exception will be thrown to indicate this is not possible.

Parameters
stateThe delivery state to apply to this delivery
settledShould the delivery be settled
Returns
This incoming delivery instance
Exceptions
InvalidOperationExceptionIf already locally settled"

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ ReadAll()

IProtonBuffer Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.ReadAll ( )
inline

Returns the current read buffer without copying it effectively consuming all currently available bytes from this delivery. If no data is available then this method returns null.

Returns
The currently available delivery bytes without copying them.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ ReadBytes() [1/2]

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.ReadBytes ( byte[]  target,
int  offset,
int  length 
)
inline

Reads bytes from this delivery and writes them into the destination array starting at the given offset and continuing for the specified length reducing the available bytes by the value of the number of bytes written to the target.

Parameters
targetThe byte array where the bytes are written
offsetThe offset into the array to start writing at
lengthThe number of bytes to write into the array
Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ ReadBytes() [2/2]

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.ReadBytes ( IProtonBuffer  buffer)
inline

Reads bytes from this delivery and writes them into the destination buffer reducing the available bytes by the value of the number of bytes written to the target. The number of bytes written will be the equal to the writable bytes of the target buffer. The writable bytes of the target buffer will be decremented by the number of bytes written into it.

Parameters
bufferThe buffer to write into
Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ Settle()

IIncomingDelivery Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Settle ( )
inline

Settles this delivery locally, transmitting a disposition frame to the remote if the remote has not already settled the delivery. Once locally settled the delivery will not accept any additional updates to the delivery state via one of the disposition methods.

Returns
This incoming delivery instance

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

Property Documentation

◆ Attachments

IAttachments Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Attachments
get

Access the attachments instance that allows callers to attach state data to an incoming delivery instance.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ Available

long Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Available
get

Returns the number of bytes that are currently available for reading from this incoming delivery. Note that this value will change as bytes are received, and is in general not equal to the total length of a delivery until the point where the is partial check returns false and no content has yet been received by the application.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ DefaultDeliveryState

IDeliveryState Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.DefaultDeliveryState
getset

Configures a default delivery state to be used if a received delivery is settled/freed without any disposition state having been previously applied.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ DeliveryTag

IDeliveryTag Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.DeliveryTag
get

Access the delivery tag that the remote sender assigned to this incoming delivery.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ IsAborted

bool Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.IsAborted
get

Checks if the delivery has been aborted by the remote sender.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ IsPartial

bool Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.IsPartial
get

Checks if the delivery is partial or has been completed by the remote.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ IsRemotelySettled

bool Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.IsRemotelySettled
get

Checks if the delivery has been settled by the remote.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ IsSettled

bool Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.IsSettled
get

Checks if the delivery has been settled locally.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ LinkedResource

object Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.LinkedResource
getset

Allows the endpoint to have some user defined resource linked to it which can be used to store application state data or other associated object instances with this incoming delivery.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ MessageFormat

uint Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.MessageFormat
getset

Access the message-format for this Delivery, representing the 32bit value using an unsigned int. The default value is 0 as per the message format defined in the core AMQP 1.0 specification.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ Receiver

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.Receiver
get

Returns a reference to the parent receiver that read this delivery.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ RemoteState

IDeliveryState Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.RemoteState
getset

Access the delivery state assigned by the remote end of this delivery.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ State

IDeliveryState Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.State
get

Access the delivery state assigned by the local end of this delivery.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.

◆ TransferCount

uint Apache.Qpid.Proton.Engine.Implementation.ProtonIncomingDelivery.TransferCount
get

Returns the total number of transfer frames that have occurred for this delivery so far.

Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.


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