public interface Link extends Endpoint
SenderSettleMode.MIXED
.
Receiver settle mode - ReceiverSettleMode.FIRST
TODO describe the application's responsibility to honour settlement.Modifier and Type | Method and Description |
---|---|
boolean |
advance()
Attempts to advance the current delivery.
|
Delivery |
current()
Returns the current 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(byte[] tag,
int offset,
int length)
Create a delivery object based on the specified tag.
|
void |
detach() |
boolean |
detached() |
int |
drained() |
int |
getCredit()
Gets the credit balance for a link.
|
Symbol[] |
getDesiredCapabilities()
Gets the local link desired capabilities.
|
boolean |
getDrain() |
UnsignedLong |
getMaxMessageSize()
Gets the local link max message size.
|
java.lang.String |
getName()
Returns the name of the link
|
Symbol[] |
getOfferedCapabilities()
Gets the local link offered capabilities.
|
java.util.Map<Symbol,java.lang.Object> |
getProperties()
Gets the local link properties.
|
int |
getQueued()
Gets the number of queued messages for a link.
|
ReceiverSettleMode |
getReceiverSettleMode() |
int |
getRemoteCredit()
|
Symbol[] |
getRemoteDesiredCapabilities()
Gets the remote link desired capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
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.
|
Symbol[] |
getRemoteOfferedCapabilities()
Gets the remote link offered capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
java.util.Map<Symbol,java.lang.Object> |
getRemoteProperties()
Gets the remote link properties, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
ReceiverSettleMode |
getRemoteReceiverSettleMode() |
SenderSettleMode |
getRemoteSenderSettleMode() |
Source |
getRemoteSource() |
Target |
getRemoteTarget() |
SenderSettleMode |
getSenderSettleMode() |
Session |
getSession() |
Source |
getSource() |
Target |
getTarget() |
int |
getUnsettled() |
Delivery |
head()
Returns the head delivery on the link.
|
Link |
next(java.util.EnumSet<EndpointState> local,
java.util.EnumSet<EndpointState> remote) |
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.
|
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.
|
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.
|
void |
setProperties(java.util.Map<Symbol,java.lang.Object> properties)
Sets the local link properties, to be conveyed to the peer via the Attach frame when
attaching the link to the session.
|
void |
setReceiverSettleMode(ReceiverSettleMode receiverSettleMode)
Sets the receiver settle mode.
|
void |
setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)
Deprecated.
|
void |
setSenderSettleMode(SenderSettleMode senderSettleMode)
Sets the sender settle mode.
|
void |
setSource(Source address)
Sets the source for this link.
|
void |
setTarget(Target address)
Expected to be used in a similar manner to
setSource(Source) |
close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
attachments
java.lang.String getName()
Delivery delivery(byte[] tag)
Connection.getWorkHead()
.tag
- a tag for the deliveryDelivery delivery(byte[] tag, int offset, int length)
tag
- a tag for the deliveryoffset
- (currently ignored and must be 0)length
- (currently ignored and must be the length of the tag
arrayDelivery head()
Delivery current()
boolean advance()
Source getSource()
Target getTarget()
void setSource(Source address)
getRemoteSource()
to determine an actual Source. If it
failed to determine an actual source, it should set null, and then go on to Endpoint.close()
the link.void setTarget(Target address)
setSource(Source)
Source getRemoteSource()
setSource(Source)
Target getRemoteTarget()
setTarget(Target)
Link next(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
int getCredit()
queued
by the link until enough credit is obtained
from the receiver to send them over the wire. In this case the balance
reported will go negative.int getQueued()
credit
to send them to the receiver, they may not have yet had a chance
to be written to the wire, or the receiving application has simply not yet processed them.int getUnsettled()
Session getSession()
SenderSettleMode getSenderSettleMode()
void setSenderSettleMode(SenderSettleMode senderSettleMode)
Endpoint.open()
.
If this endpoint is the initiator of the link, this method can be used to set a value other than
the default.
If this endpoint is not the initiator, this method should be used to set a local value. According
to the AMQP spec, the application may choose to accept the sender's suggestion
(accessed by calling getRemoteSenderSettleMode()
) or choose another value. The value
has no effect on Proton, but may be useful to the application at a later point.
In order to be AMQP compliant the application is responsible for honouring the settlement mode. See Link
.SenderSettleMode getRemoteSenderSettleMode()
setSenderSettleMode(SenderSettleMode)
ReceiverSettleMode getReceiverSettleMode()
void setReceiverSettleMode(ReceiverSettleMode receiverSettleMode)
setSenderSettleMode(SenderSettleMode)
ReceiverSettleMode getRemoteReceiverSettleMode()
@Deprecated void setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)
java.util.Map<Symbol,java.lang.Object> getProperties()
setProperties(Map)
void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
Endpoint.open()
method.java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
int drained()
int getRemoteCredit()
credit
count as well as the effect of
any locally queued
messages.boolean getDrain()
void detach()
boolean detached()
void setOfferedCapabilities(Symbol[] offeredCapabilities)
Endpoint.open()
method.offeredCapabilities
- the offered capabilities array to send, or null for none.Symbol[] getOfferedCapabilities()
setOfferedCapabilities(Symbol[])
Symbol[] getRemoteOfferedCapabilities()
void setDesiredCapabilities(Symbol[] desiredCapabilities)
Endpoint.open()
method.desiredCapabilities
- the desired capabilities array to send, or null for none.Symbol[] getDesiredCapabilities()
setDesiredCapabilities(Symbol[])
Symbol[] getRemoteDesiredCapabilities()
void setMaxMessageSize(UnsignedLong maxMessageSize)
Endpoint.open()
method.maxMessageSize
- the local max message size value, or null to clear. 0 also means no limit.UnsignedLong getMaxMessageSize()
setMaxMessageSize(UnsignedLong)
UnsignedLong getRemoteMaxMessageSize()