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 Delivery
public DeliveryState getRemoteState()
getRemoteState
in interface Delivery
public boolean remotelySettled()
remotelySettled
in interface Delivery
public 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 Delivery
messageFormat
- the message formatpublic int getMessageFormat()
Delivery
getMessageFormat
in interface Delivery
Delivery.setMessageFormat(int)
public void disposition(DeliveryState state)
Delivery
disposition
in interface Delivery
state
- the new delivery statepublic void settle()
Delivery
Connection.getWorkHead()
).
If this delivery is its link's current delivery, the link's current delivery pointer is advanced.public DeliveryImpl next()
public void free()
Delivery
public DeliveryImpl getWorkNext()
getWorkNext
in interface Delivery
Connection.getWorkHead()
public boolean isSettled()
Delivery
isSettled
in interface Delivery
Delivery.settle()
public int available()
Delivery
Delivery.isPartial()
returns false and no content has yet been received by the
application or sent by the transport.available
in interface Delivery
Receiver.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 Delivery
public boolean isReadable()
Delivery
isReadable
in interface Delivery
Receiver.recv(byte[], int, int)
public boolean isAborted()
Delivery
public boolean isPartial()
Delivery
aborted
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 Delivery
Delivery.isAborted()
public boolean isUpdated()
Delivery
public boolean isBuffered()
isBuffered
in interface Delivery
public java.lang.Object getContext()
getContext
in interface Delivery
public void setContext(java.lang.Object context)
setContext
in interface Delivery
public Record attachments()
attachments
in interface Extendable
public java.lang.String toString()
toString
in class java.lang.Object
public void setDefaultDeliveryState(DeliveryState state)
Delivery
setDefaultDeliveryState
in interface Delivery
state
- the default delivery statepublic DeliveryState getDefaultDeliveryState()
getDefaultDeliveryState
in interface Delivery