public class DeliveryImpl extends java.lang.Object implements Delivery
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MESSAGE_FORMAT |
| Modifier and Type | Method and Description |
|---|---|
Record |
attachments() |
int |
available()
Returns the number of bytes currently available for this delivery, which may not be complete yet, that are still
to either be received by the application or sent by the transport.
|
void |
clear() |
void |
disposition(DeliveryState state)
updates the state of the delivery
The new state may have no on-the-wire effect, if delivery settlement was already communicated to/from the peer.
|
void |
free()
TODO When does an application call this method? Do we really need this?
|
java.lang.Object |
getContext() |
DeliveryState |
getDefaultDeliveryState() |
LinkImpl |
getLink() |
DeliveryState |
getLocalState() |
int |
getMessageFormat()
Gets the message-format for this Delivery, representing the 32bit value using an int.
|
DeliveryState |
getRemoteState() |
byte[] |
getTag() |
DeliveryImpl |
getWorkNext() |
boolean |
isAborted()
Check for whether the delivery was aborted.
|
boolean |
isBuffered() |
boolean |
isPartial()
Check for whether the delivery is still partial.
|
boolean |
isReadable()
Returns whether this delivery has data ready to be received.
|
boolean |
isSettled()
Returns whether this delivery has been settled.
|
boolean |
isUpdated()
Returns whether this delivery's state or settled flag has ever remotely changed.
|
boolean |
isWritable() |
DeliveryImpl |
next() |
int |
pending() |
boolean |
remotelySettled() |
void |
setContext(java.lang.Object context) |
void |
setDefaultDeliveryState(DeliveryState state)
Configures a default DeliveryState to be used if a
received delivery is settled/freed without any disposition
state having been previously applied.
|
void |
setMessageFormat(int messageFormat)
Sets the message-format for this Delivery, representing the 32bit value using an int.
|
void |
settle()
Settles this delivery.
|
java.lang.String |
toString() |
public static final int DEFAULT_MESSAGE_FORMAT
public DeliveryState getLocalState()
getLocalState in interface Deliverypublic DeliveryState getRemoteState()
getRemoteState in interface Deliverypublic boolean remotelySettled()
remotelySettled in interface Deliverypublic void setMessageFormat(int messageFormat)
Delivery
See the following for more details:
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-transfer
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-message-format
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#definition-MESSAGE-FORMAT
setMessageFormat in interface DeliverymessageFormat - the message formatpublic int getMessageFormat()
DeliverygetMessageFormat in interface DeliveryDelivery.setMessageFormat(int)public void disposition(DeliveryState state)
Deliverydisposition in interface Deliverystate - the new delivery statepublic void settle()
DeliveryConnection.getWorkHead()).
If this delivery is its link's current delivery, the link's current delivery pointer is advanced.public DeliveryImpl next()
public void free()
Deliverypublic DeliveryImpl getWorkNext()
getWorkNext in interface DeliveryConnection.getWorkHead()public boolean isSettled()
DeliveryisSettled in interface DeliveryDelivery.settle()public int available()
DeliveryDelivery.isPartial() returns false and no content has yet been received by the
application or sent by the transport.available in interface DeliveryReceiver.recv(byte[], int, int),
Receiver.recv(org.apache.qpid.proton.codec.WritableBuffer),
Sender.send(byte[], int, int),
Sender.send(org.apache.qpid.proton.codec.ReadableBuffer)public boolean isWritable()
isWritable in interface Deliverypublic boolean isReadable()
DeliveryisReadable in interface DeliveryReceiver.recv(byte[], int, int)public boolean isAborted()
Deliverypublic boolean isPartial()
Deliveryaborted delivery
will also be considered partial and the full payload won't
be received.
For a sending Delivery, this means the sender link has not been
advanced to complete the delivery yet.isPartial in interface DeliveryDelivery.isAborted()public boolean isUpdated()
Deliverypublic boolean isBuffered()
isBuffered in interface Deliverypublic java.lang.Object getContext()
getContext in interface Deliverypublic void setContext(java.lang.Object context)
setContext in interface Deliverypublic Record attachments()
attachments in interface Extendablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void setDefaultDeliveryState(DeliveryState state)
DeliverysetDefaultDeliveryState in interface Deliverystate - the default delivery statepublic DeliveryState getDefaultDeliveryState()
getDefaultDeliveryState in interface Delivery