Proton DotNet
|
Represents an outgoing delivery that is sent from a local sender to a remote receiver on an open link. More...
Public Member Functions | |
IOutgoingDelivery | WriteBytes (IProtonBuffer buffer) |
Write the given bytes as the payload of this delivery, no additional writes can occur on this delivery if the write succeeds in sending all of the given bytes. When called the provided buffer is treated as containing the entirety of the transfer payload and the Transfer(s) that result from this call will result in a final Transfer frame whose more flag is set to false which tells the remote that no additional data will be sent for this delivery. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from the sender that indicate that the it has become sendable once again or the caller should check via polling that the sender has become sendable periodically until it becomes true once again. | |
IOutgoingDelivery | StreamBytes (IProtonBuffer buffer) |
Write the given bytes as a portion of the payload of this delivery, additional bytes can be streamed until the stream complete flag is set to true on a call to either the stream bytes method that accepts a done flag or a call to the write bytes API where all bytes are consumed from the passed in buffer. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from sender state update event or poll the sender to see when it becomes writeable once more and again attempt to write the remaining bytes. | |
IOutgoingDelivery | StreamBytes (IProtonBuffer buffer, bool complete) |
Write the given bytes as a portion of the payload of this delivery, additional bytes can be streamed until the stream complete flag is set to true on a call to either this method method or a call to the write bytes API where all bytes are consumed from the passed in buffer. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from sender state update event or poll the sender to see when it becomes writeable once more and again attempt to write the remaining bytes. | |
IOutgoingDelivery | Abort () |
Aborts the outgoing delivery if it has not already been marked as complete. | |
IOutgoingDelivery | Disposition (IDeliveryState state) |
Update the delivery with the given disposition if not locally settled. | |
IOutgoingDelivery | 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. | |
IOutgoingDelivery | 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. | |
IOutgoingDelivery | DeliveryStateUpdatedHandler (Action< IOutgoingDelivery > handler) |
Handler for updates to the remote state of outgoing deliveries that have previously been sent. Remote state updates for an previously sent 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 | |
ISender | Sender [get] |
Returns the sender instance that owns this outgoing delivery. | |
IAttachments | Attachments [get] |
Access the attachments instance that allows callers to attach state data to an outgoing 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 outgoing delivery. | |
uint | MessageFormat [get, set] |
Sets the message-format for this Delivery, representing the 32bit value using an unsigned integer value. The message format can only be set prior to the first Transfer of delivery payload having been written. If one of the delivery write methods is called prior to the message format being set then it defaults to the AMQP default format of zero. If called after having written delivery payload bytes the set access method throws an exception. The default value is 0 as per the message format defined in the core AMQP 1.0 specification. | |
IDeliveryTag | DeliveryTag [get, set] |
Access the delivery tag to assign to this outgoing delivery which if setting a value must be done prior to calling one of the delivery bytes write methods. | |
byte[] | DeliveryTagBytes [get, set] |
Access the delivery tag to assign to this outgoing delivery as a byte array which if setting a value must be done prior to calling one of the delivery bytes write methods. | |
bool | IsPartial [get] |
Returns if the delivery is in a partial state meaning that the sender has not completed the write of payload via one of the byte write methods. | |
bool | IsAborted [get] |
Checks if the delivery was previously aborted. | |
IDeliveryState | State [get] |
Access the delivery state assigned by the local end of this delivery. | |
IDeliveryState | RemoteState [get] |
Access the delivery state assigned by the remote end of this delivery. | |
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 arrived for this delivery so far. | |
Represents an outgoing delivery that is sent from a local sender to a remote receiver on an open link.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.Abort | ( | ) |
Aborts the outgoing delivery if it has not already been marked as complete.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.DeliveryStateUpdatedHandler | ( | Action< IOutgoingDelivery > | handler | ) |
Handler for updates to the remote state of outgoing deliveries that have previously been sent. Remote state updates for an previously sent 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 |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.Disposition | ( | IDeliveryState | state | ) |
Update the delivery with the given disposition if not locally settled.
state | The delivery state to apply to this delivery |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.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.
state | The delivery state to apply to this delivery |
settled | Should the delivery be settled |
InvalidOperationException | If already locally settled" |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.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.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.StreamBytes | ( | IProtonBuffer | buffer | ) |
Write the given bytes as a portion of the payload of this delivery, additional bytes can be streamed until the stream complete flag is set to true on a call to either the stream bytes method that accepts a done flag or a call to the write bytes API where all bytes are consumed from the passed in buffer. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from sender state update event or poll the sender to see when it becomes writeable once more and again attempt to write the remaining bytes.
buffer | The payload to send for this delivery. |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.StreamBytes | ( | IProtonBuffer | buffer, |
bool | complete | ||
) |
Write the given bytes as a portion of the payload of this delivery, additional bytes can be streamed until the stream complete flag is set to true on a call to either this method method or a call to the write bytes API where all bytes are consumed from the passed in buffer. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from sender state update event or poll the sender to see when it becomes writeable once more and again attempt to write the remaining bytes.
buffer | The payload to send for this delivery. |
complete | Should the delivery be completed. |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
IOutgoingDelivery Apache.Qpid.Proton.Engine.IOutgoingDelivery.WriteBytes | ( | IProtonBuffer | buffer | ) |
Write the given bytes as the payload of this delivery, no additional writes can occur on this delivery if the write succeeds in sending all of the given bytes. When called the provided buffer is treated as containing the entirety of the transfer payload and the Transfer(s) that result from this call will result in a final Transfer frame whose more flag is set to false which tells the remote that no additional data will be sent for this delivery. The sender will output as much of the buffer as possible within the constraints of both the link credit and the current capacity of the parent session. The caller must check that all bytes were written and if not they should await updates from the sender that indicate that the it has become sendable once again or the caller should check via polling that the sender has become sendable periodically until it becomes true once again.
buffer | The payload to send for this delivery. |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Access the attachments instance that allows callers to attach state data to an outgoing delivery instance.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
getset |
Access the delivery tag to assign to this outgoing delivery which if setting a value must be done prior to calling one of the delivery bytes write methods.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
getset |
Access the delivery tag to assign to this outgoing delivery as a byte array which if setting a value must be done prior to calling one of the delivery bytes write methods.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Checks if the delivery was previously aborted.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Returns if the delivery is in a partial state meaning that the sender has not completed the write of payload via one of the byte write methods.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Checks if the delivery has been settled by the remote.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Checks if the delivery has been settled locally.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
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 outgoing delivery.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
getset |
Sets the message-format for this Delivery, representing the 32bit value using an unsigned integer value. The message format can only be set prior to the first Transfer of delivery payload having been written. If one of the delivery write methods is called prior to the message format being set then it defaults to the AMQP default format of zero. If called after having written delivery payload bytes the set access method throws an exception. The default value is 0 as per the message format defined in the core AMQP 1.0 specification.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Access the delivery state assigned by the remote end of this delivery.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Returns the sender instance that owns this outgoing delivery.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Access the delivery state assigned by the local end of this delivery.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.
|
get |
Returns the total number of transfer frames that have arrived for this delivery so far.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonOutgoingDelivery.