org.apache.qpid.proton.engine
Interface Delivery


public interface Delivery

A delivery of a message on a particular link. Whilst a message is logically a long-lived object, a delivery is short-lived - it is only intended to be used by the application until it is settled and all its data has been read.


Method Summary
 void disposition(DeliveryState state)
          updates the state of the delivery
 void free()
          TODO When does an application call this method? Do we really need this?
 java.lang.Object getContext()
           
 Link getLink()
           
 DeliveryState getLocalState()
           
 int getMessageFormat()
          TODO is this required??
 DeliveryState getRemoteState()
           
 byte[] getTag()
           
 Delivery getWorkNext()
           
 boolean isPartial()
           
 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()
           
 int pending()
           
 boolean remotelySettled()
           
 void setContext(java.lang.Object o)
           
 void settle()
          Settles this delivery.
 

Method Detail

getTag

byte[] getTag()

getLink

Link getLink()

getLocalState

DeliveryState getLocalState()

getRemoteState

DeliveryState getRemoteState()

getMessageFormat

int getMessageFormat()
TODO is this required??


disposition

void disposition(DeliveryState state)
updates the state of the delivery

Parameters:
state - the new delivery state

settle

void settle()
Settles this delivery. Causes the delivery to be removed from the connection's work list (see Connection.getWorkHead()). If this delivery is its link's current delivery, the link's current delivery pointer is advanced.


isSettled

boolean isSettled()
Returns whether this delivery has been settled. TODO proton-j and proton-c return the local and remote statuses respectively. Resolve this ambiguity.

See Also:
settle()

remotelySettled

boolean remotelySettled()

free

void free()
TODO When does an application call this method? Do we really need this?


getWorkNext

Delivery getWorkNext()
See Also:
Connection.getWorkHead()

isWritable

boolean isWritable()

isReadable

boolean isReadable()
Returns whether this delivery has data ready to be received.

See Also:
Receiver.recv(byte[], int, int)

setContext

void setContext(java.lang.Object o)

getContext

java.lang.Object getContext()

isUpdated

boolean isUpdated()
Returns whether this delivery's state or settled flag has ever remotely changed. TODO what is the main intended use case for calling this method?


isPartial

boolean isPartial()

pending

int pending()