public abstract class LinkImpl extends EndpointImpl implements Link
| Modifier and Type | Method and Description |
|---|---|
void |
addCredit(int credit) |
boolean |
advance()
Attempts to advance the current delivery.
|
DeliveryImpl |
current()
Returns the current delivery
|
DeliveryImpl |
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.
|
DeliveryImpl |
delivery(byte[] tag,
int offset,
int length)
Create a delivery object based on the specified tag.
|
void |
detach() |
boolean |
detached() |
int |
drained() |
protected ConnectionImpl |
getConnectionImpl() |
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() |
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() |
SessionImpl |
getSession() |
Source |
getSource() |
Target |
getTarget() |
int |
getUnsettled() |
DeliveryImpl |
head()
Returns the head delivery on the link.
|
Link |
next(java.util.EnumSet<EndpointState> local,
java.util.EnumSet<EndpointState> remote) |
void |
setCredit(int credit) |
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)
TODO should this be part of the interface?
|
void |
setSenderSettleMode(SenderSettleMode senderSettleMode)
Sets the sender settle mode.
|
void |
setSource(Source source)
Sets the source for this link.
|
void |
setTarget(Target target)
Expected to be used in a similar manner to
Link.setSource(Source) |
attachments, close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRemoteCreditclose, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextattachmentspublic java.lang.String getName()
Linkpublic DeliveryImpl delivery(byte[] tag)
LinkConnection.getWorkHead().public DeliveryImpl delivery(byte[] tag, int offset, int length)
Linkpublic DeliveryImpl current()
Linkpublic boolean advance()
Linkprotected ConnectionImpl getConnectionImpl()
getConnectionImpl in class EndpointImplpublic SessionImpl getSession()
getSession in interface Linkpublic Source getRemoteSource()
getRemoteSource in interface LinkLink.setSource(Source)public Target getRemoteTarget()
getRemoteTarget in interface LinkLink.setTarget(Target)public void setSource(Source source)
LinkLink.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.public void setTarget(Target target)
LinkLink.setSource(Source)public Link next(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
public int getCredit()
Linkqueued 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.public void addCredit(int credit)
public void setCredit(int credit)
public int getQueued()
Linkcredit 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.public int getUnsettled()
getUnsettled in interface Linkpublic SenderSettleMode getSenderSettleMode()
getSenderSettleMode in interface Linkpublic void setSenderSettleMode(SenderSettleMode senderSettleMode)
LinkEndpoint.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 Link.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.setSenderSettleMode in interface Linkpublic SenderSettleMode getRemoteSenderSettleMode()
getRemoteSenderSettleMode in interface LinkLink.setSenderSettleMode(SenderSettleMode)public void setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)
LinksetRemoteSenderSettleMode in interface Linkpublic ReceiverSettleMode getReceiverSettleMode()
getReceiverSettleMode in interface Linkpublic void setReceiverSettleMode(ReceiverSettleMode receiverSettleMode)
LinkLink.setSenderSettleMode(SenderSettleMode)setReceiverSettleMode in interface Linkpublic ReceiverSettleMode getRemoteReceiverSettleMode()
getRemoteReceiverSettleMode in interface LinkLink.setReceiverSettleMode(ReceiverSettleMode)public java.util.Map<Symbol,java.lang.Object> getProperties()
LinkgetProperties in interface LinkLink.setProperties(Map)public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
LinkEndpoint.open() method.setProperties in interface Linkpublic java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
LinkgetRemoteProperties in interface Linkpublic Symbol[] getDesiredCapabilities()
LinkgetDesiredCapabilities in interface LinkLink.setDesiredCapabilities(Symbol[])public void setDesiredCapabilities(Symbol[] desiredCapabilities)
LinkEndpoint.open() method.setDesiredCapabilities in interface LinkdesiredCapabilities - the desired capabilities array to send, or null for none.public Symbol[] getRemoteDesiredCapabilities()
LinkgetRemoteDesiredCapabilities in interface Linkpublic Symbol[] getOfferedCapabilities()
LinkgetOfferedCapabilities in interface LinkLink.setOfferedCapabilities(Symbol[])public void setOfferedCapabilities(Symbol[] offeredCapabilities)
LinkEndpoint.open() method.setOfferedCapabilities in interface LinkofferedCapabilities - the offered capabilities array to send, or null for none.public Symbol[] getRemoteOfferedCapabilities()
LinkgetRemoteOfferedCapabilities in interface Linkpublic UnsignedLong getMaxMessageSize()
LinkgetMaxMessageSize in interface LinkLink.setMaxMessageSize(UnsignedLong)public void setMaxMessageSize(UnsignedLong maxMessageSize)
LinkEndpoint.open() method.setMaxMessageSize in interface LinkmaxMessageSize - the local max message size value, or null to clear. 0 also means no limit.public UnsignedLong getRemoteMaxMessageSize()
LinkgetRemoteMaxMessageSize in interface Linkpublic DeliveryImpl head()
Link