public abstract class LinkImpl extends EndpointImpl implements Link
| Modifier and Type | Field and Description |
|---|---|
private int |
_credit |
(package private) DeliveryImpl |
_current |
private boolean |
_detached |
private boolean |
_drain |
private int |
_drained |
(package private) DeliveryImpl |
_head |
private java.lang.String |
_name |
private LinkNode<LinkImpl> |
_node |
private java.util.Map<Symbol,java.lang.Object> |
_properties |
private int |
_queued |
private ReceiverSettleMode |
_receiverSettleMode |
private java.util.Map<Symbol,java.lang.Object> |
_remoteProperties |
private ReceiverSettleMode |
_remoteReceiverSettleMode |
private SenderSettleMode |
_remoteSenderSettleMode |
private Source |
_remoteSource |
private Target |
_remoteTarget |
private SenderSettleMode |
_senderSettleMode |
private SessionImpl |
_session |
private Source |
_source |
(package private) DeliveryImpl |
_tail |
private Target |
_target |
private int |
_unsettled |
freed| Constructor and Description |
|---|
LinkImpl(SessionImpl session,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCredit(int credit) |
boolean |
advance()
Attempts to advance the current delivery.
|
DeliveryImpl |
current()
Returns the current delivery
|
(package private) void |
decrementCredit() |
(package private) void |
decrementQueued() |
(package private) void |
decrementUnsettled() |
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() |
(package private) void |
doFree() |
int |
drained() |
protected ConnectionImpl |
getConnectionImpl() |
int |
getCredit() |
boolean |
getDrain() |
(package private) int |
getDrained() |
java.lang.String |
getName()
Returns the name of the link
|
java.util.Map<Symbol,java.lang.Object> |
getProperties()
Gets the local link properties.
|
int |
getQueued() |
ReceiverSettleMode |
getReceiverSettleMode() |
int |
getRemoteCredit() |
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() |
(package private) abstract TransportLink |
getTransportLink() |
int |
getUnsettled() |
(package private) boolean |
hasCredit() |
DeliveryImpl |
head()
Returns the head delivery on the link.
|
(package private) void |
incrementCredit() |
(package private) void |
incrementQueued() |
(package private) void |
incrementUnsettled() |
(package private) void |
localClose() |
(package private) void |
localOpen() |
(package private) void |
modifyEndpoints() |
Link |
next(java.util.EnumSet<EndpointState> local,
java.util.EnumSet<EndpointState> remote) |
(package private) void |
postFinal() |
void |
remove(DeliveryImpl delivery) |
void |
setCredit(int credit) |
(package private) void |
setDrain(boolean drain) |
(package private) void |
setDrained(int value) |
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.
|
(package private) void |
setRemoteProperties(java.util.Map<Symbol,java.lang.Object> remoteProperties) |
(package private) void |
setRemoteReceiverSettleMode(ReceiverSettleMode remoteReceiverSettleMode) |
void |
setRemoteSenderSettleMode(SenderSettleMode remoteSenderSettleMode)
TODO should this be part of the interface?
|
(package private) void |
setRemoteSource(Source source) |
(package private) void |
setRemoteTarget(Target target) |
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, clearModified, close, decref, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, incref, isModified, modified, modified, open, setCondition, setContext, setLocalState, setRemoteState, setTransportNext, setTransportPrev, transportNext, transportPrevclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextattachmentsprivate final SessionImpl _session
DeliveryImpl _head
DeliveryImpl _tail
DeliveryImpl _current
private java.lang.String _name
private Source _source
private Source _remoteSource
private Target _target
private Target _remoteTarget
private int _queued
private int _credit
private int _unsettled
private int _drained
private SenderSettleMode _senderSettleMode
private SenderSettleMode _remoteSenderSettleMode
private ReceiverSettleMode _receiverSettleMode
private ReceiverSettleMode _remoteReceiverSettleMode
private boolean _drain
private boolean _detached
private java.util.Map<Symbol,java.lang.Object> _properties
private java.util.Map<Symbol,java.lang.Object> _remoteProperties
LinkImpl(SessionImpl session, java.lang.String name)
public java.lang.String getName()
Linkpublic DeliveryImpl delivery(byte[] tag)
LinkConnection.getWorkHead().public DeliveryImpl delivery(byte[] tag, int offset, int length)
Linkvoid postFinal()
postFinal in class EndpointImplvoid doFree()
doFree in class EndpointImplvoid modifyEndpoints()
public void remove(DeliveryImpl delivery)
public 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)void setRemoteSource(Source source)
public Target getRemoteTarget()
getRemoteTarget in interface LinkLink.setTarget(Target)void setRemoteTarget(Target 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)
abstract TransportLink getTransportLink()
public void addCredit(int credit)
public void setCredit(int credit)
boolean hasCredit()
void incrementCredit()
void decrementCredit()
void incrementQueued()
void decrementQueued()
public int getUnsettled()
getUnsettled in interface Linkvoid incrementUnsettled()
void decrementUnsettled()
void setDrain(boolean drain)
public 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)void setRemoteReceiverSettleMode(ReceiverSettleMode remoteReceiverSettleMode)
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 Linkvoid setRemoteProperties(java.util.Map<Symbol,java.lang.Object> remoteProperties)
int getDrained()
void setDrained(int value)
public int getRemoteCredit()
getRemoteCredit in interface Linkpublic DeliveryImpl head()
Linkvoid localOpen()
localOpen in class EndpointImplvoid localClose()
localClose in class EndpointImpl