Proton DotNet
|
Proton Incoming Delivery implementation that wraps all the details of managing the read of delivery payload and management of delivery state. More...
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. | |
![]() |
Proton Incoming Delivery implementation that wraps all the details of managing the read of delivery payload and management of delivery state.
|
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.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
handler | A delegate that will handle this event |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
handler | A delegate that will handle this event |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
handler | A delegate that will handle this event |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
inline |
Update the delivery with the given disposition if not locally settled.
state | The delivery state to apply to this delivery |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
state | The delivery state to apply to this delivery |
settled | Should the delivery be settled |
InvalidOperationException | If already locally settled" |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
target | The byte array where the bytes are written |
offset | The offset into the array to start writing at |
length | The number of bytes to write into the array |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
buffer | The buffer to write into |
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Access the attachments instance that allows callers to attach state data to an incoming delivery instance.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
|
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.
|
get |
Access the delivery tag that the remote sender assigned to this incoming delivery.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Checks if the delivery has been aborted by the remote sender.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Checks if the delivery is partial or has been completed by the remote.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Checks if the delivery has been settled by the remote.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Checks if the delivery has been settled locally.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
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.
|
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.
|
get |
Returns a reference to the parent receiver that read this delivery.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
getset |
Access the delivery state assigned by the remote end of this delivery.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Access the delivery state assigned by the local end of this delivery.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.
|
get |
Returns the total number of transfer frames that have occurred for this delivery so far.
Implements Apache.Qpid.Proton.Engine.IIncomingDelivery.