Link

Link

The settlement mode defaults are:

Sender settle mode - {@link SenderSettleMode#MIXED}. Receiver settle mode - {@link ReceiverSettleMode#FIRST}

TODO describe the application's responsibility to honour settlement.

Members

Functions

advance
bool advance()

Attempts to advance the current delivery. Advances it to the next delivery if one exists, else null.

current
Delivery current()

Returns the current delivery

delivery
Delivery delivery(byte[] tag)

Create a delivery object based on the specified tag and adds it to the this link's delivery list and its connection work list.

delivery
Delivery delivery(byte[] tag, int offset, int length)

Create a delivery object based on the specified tag. This form of the method is intended to allow the tag to be formed from a subsequence of the byte array passed in. This might allow more optimisation options in future but at present is not implemented.

detach
void detach()
Undocumented in source.
detached
bool detached()
Undocumented in source.
drained
int drained()
Undocumented in source.
getCredit
int getCredit()

Gets the credit balance for a link.

getDesiredCapabilities
Symbol[] getDesiredCapabilities()

Gets the local link desired capabilities.

getDrain
bool getDrain()
Undocumented in source.
getMaxMessageSize
UnsignedLong getMaxMessageSize()

Gets the local link max message size.

getName
string getName()

Returns the name of the link

getOfferedCapabilities
Symbol[] getOfferedCapabilities()

Gets the local link offered capabilities.

getProperties
Map!(Symbol, Object) getProperties()

Gets the local link properties.

getQueued
int getQueued()

Gets the number of queued messages for a link.

getReceiverSettleMode
ReceiverSettleMode getReceiverSettleMode()
Undocumented in source.
getRemoteCredit
int getRemoteCredit()

Returns a [locally generated] view of credit at the remote peer by considering the current link {@link #getCredit() credit} count as well as the effect of any locally {@link #getQueued() queued} messages.

getRemoteDesiredCapabilities
Symbol[] getRemoteDesiredCapabilities()

Gets the remote link desired capabilities, as conveyed from the peer via the Attach frame when attaching the link to the session.

getRemoteMaxMessageSize
UnsignedLong getRemoteMaxMessageSize()

Gets the remote link max message size, as conveyed from the peer via the Attach frame when attaching the link to the session.

getRemoteOfferedCapabilities
Symbol[] getRemoteOfferedCapabilities()

Gets the remote link offered capabilities, as conveyed from the peer via the Attach frame when attaching the link to the session.

getRemoteProperties
Map!(Symbol, Object) getRemoteProperties()

Gets the remote link properties, as conveyed from the peer via the Attach frame when attaching the link to the session.

getRemoteReceiverSettleMode
ReceiverSettleMode getRemoteReceiverSettleMode()

@see #setReceiverSettleMode(ReceiverSettleMode)

getRemoteSenderSettleMode
SenderSettleMode getRemoteSenderSettleMode()

@see #setSenderSettleMode(SenderSettleMode)

getRemoteSource
Source getRemoteSource()

@see #setSource(Source)

getRemoteTarget
Target getRemoteTarget()

@see #setTarget(Target)

getSenderSettleMode
SenderSettleMode getSenderSettleMode()
Undocumented in source.
getSession
Session getSession()
Undocumented in source.
getSource
Source getSource()
Undocumented in source.
getTarget
Target getTarget()
Undocumented in source.
getUnsettled
int getUnsettled()
Undocumented in source.
head
Delivery head()

Returns the head delivery on the link.

next
Link next(Set!EndpointState local, Set!EndpointState remote)
Undocumented in source.
setDesiredCapabilities
void setDesiredCapabilities(Symbol[] desiredCapabilities)

Sets the local link desired capabilities, to be conveyed to the peer via the Attach frame when attaching the link to the session.

setMaxMessageSize
void setMaxMessageSize(UnsignedLong maxMessageSize)

Sets the local link max message size, to be conveyed to the peer via the Attach frame when attaching the link to the session. Null or 0 means no limit.

setOfferedCapabilities
void setOfferedCapabilities(Symbol[] offeredCapabilities)

Sets the local link offered capabilities, to be conveyed to the peer via the Attach frame when attaching the link to the session.

setProperties
void setProperties(Map!(Symbol, Object) properties)

Sets the local link properties, to be conveyed to the peer via the Attach frame when attaching the link to the session.

setReceiverSettleMode
void setReceiverSettleMode(ReceiverSettleMode receiverSettleMode)

Sets the receiver settle mode.

setRemoteSenderSettleMode
void setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)

TODO should this be part of the interface?

setSenderSettleMode
void setSenderSettleMode(SenderSettleMode senderSettleMode)

Sets the sender settle mode.

setSource
void setSource(Source address)

Sets the source for this link.

setTarget
void setTarget(Target address)

Expected to be used in a similar manner to {@link #setSource(Source)}

Inherited Members

From Endpoint

getLocalState
EndpointState getLocalState()

@return the local endpoint state

getRemoteState
EndpointState getRemoteState()

@return the remote endpoint state (as last communicated)

getCondition
ErrorCondition getCondition()

@return the local endpoint error, or null if there is none

setCondition
void setCondition(ErrorCondition condition)

Set the local error condition @param condition

getRemoteCondition
ErrorCondition getRemoteCondition()

@return the remote endpoint error, or null if there is none

free
void free()

free the endpoint and any associated resources

open
void open()

transition local state to ACTIVE

close
void close()

transition local state to CLOSED

setContext
void setContext(Object o)

Sets an arbitrary an application owned object on the end-point. This object is not used by Proton.

getContext
Object getContext()

@see #setContext(Object)

Meta