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, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRemoteCredit
close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
attachments
public java.lang.String getName()
Link
public DeliveryImpl delivery(byte[] tag)
Link
Connection.getWorkHead()
.public DeliveryImpl delivery(byte[] tag, int offset, int length)
Link
public DeliveryImpl current()
Link
public boolean advance()
Link
protected ConnectionImpl getConnectionImpl()
getConnectionImpl
in class EndpointImpl
public SessionImpl getSession()
getSession
in interface Link
public Source getRemoteSource()
getRemoteSource
in interface Link
Link.setSource(Source)
public Target getRemoteTarget()
getRemoteTarget
in interface Link
Link.setTarget(Target)
public void setSource(Source source)
Link
Link.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)
Link
Link.setSource(Source)
public Link next(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
public int getCredit()
Link
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.public void addCredit(int credit)
public void setCredit(int credit)
public int getQueued()
Link
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.public int getUnsettled()
getUnsettled
in interface Link
public SenderSettleMode getSenderSettleMode()
getSenderSettleMode
in interface Link
public void setSenderSettleMode(SenderSettleMode senderSettleMode)
Link
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 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 Link
public SenderSettleMode getRemoteSenderSettleMode()
getRemoteSenderSettleMode
in interface Link
Link.setSenderSettleMode(SenderSettleMode)
public void setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)
Link
setRemoteSenderSettleMode
in interface Link
public ReceiverSettleMode getReceiverSettleMode()
getReceiverSettleMode
in interface Link
public void setReceiverSettleMode(ReceiverSettleMode receiverSettleMode)
Link
Link.setSenderSettleMode(SenderSettleMode)
setReceiverSettleMode
in interface Link
public ReceiverSettleMode getRemoteReceiverSettleMode()
getRemoteReceiverSettleMode
in interface Link
Link.setReceiverSettleMode(ReceiverSettleMode)
public java.util.Map<Symbol,java.lang.Object> getProperties()
Link
getProperties
in interface Link
Link.setProperties(Map)
public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
Link
Endpoint.open()
method.setProperties
in interface Link
public java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
Link
getRemoteProperties
in interface Link
public Symbol[] getDesiredCapabilities()
Link
getDesiredCapabilities
in interface Link
Link.setDesiredCapabilities(Symbol[])
public void setDesiredCapabilities(Symbol[] desiredCapabilities)
Link
Endpoint.open()
method.setDesiredCapabilities
in interface Link
desiredCapabilities
- the desired capabilities array to send, or null for none.public Symbol[] getRemoteDesiredCapabilities()
Link
getRemoteDesiredCapabilities
in interface Link
public Symbol[] getOfferedCapabilities()
Link
getOfferedCapabilities
in interface Link
Link.setOfferedCapabilities(Symbol[])
public void setOfferedCapabilities(Symbol[] offeredCapabilities)
Link
Endpoint.open()
method.setOfferedCapabilities
in interface Link
offeredCapabilities
- the offered capabilities array to send, or null for none.public Symbol[] getRemoteOfferedCapabilities()
Link
getRemoteOfferedCapabilities
in interface Link
public UnsignedLong getMaxMessageSize()
Link
getMaxMessageSize
in interface Link
Link.setMaxMessageSize(UnsignedLong)
public void setMaxMessageSize(UnsignedLong maxMessageSize)
Link
Endpoint.open()
method.setMaxMessageSize
in interface Link
maxMessageSize
- the local max message size value, or null to clear. 0 also means no limit.public UnsignedLong getRemoteMaxMessageSize()
Link
getRemoteMaxMessageSize
in interface Link
public DeliveryImpl head()
Link