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() |
boolean |
getDrain() |
String |
getName()
Returns the name of the link
|
Map<Symbol,Object> |
getProperties()
Gets the local link properties.
|
int |
getQueued() |
ReceiverSettleMode |
getReceiverSettleMode() |
int |
getRemoteCredit() |
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.
|
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(EnumSet<EndpointState> local,
EnumSet<EndpointState> remote) |
void |
remove(DeliveryImpl delivery) |
void |
setCredit(int credit) |
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.
|
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
close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
attachments
public String getName()
Link
public DeliveryImpl delivery(byte[] tag)
Link
Connection.getWorkHead()
.public DeliveryImpl delivery(byte[] tag, int offset, int length)
Link
public void remove(DeliveryImpl delivery)
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(EnumSet<EndpointState> local, EnumSet<EndpointState> remote)
public void addCredit(int credit)
public void setCredit(int credit)
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 Map<Symbol,Object> getProperties()
Link
getProperties
in interface Link
Link.setProperties(Map)
public void setProperties(Map<Symbol,Object> properties)
Link
Endpoint.open()
method.setProperties
in interface Link
public Map<Symbol,Object> getRemoteProperties()
Link
getRemoteProperties
in interface Link
public int getRemoteCredit()
getRemoteCredit
in interface Link
public DeliveryImpl head()
Link
Copyright © 2016 The Apache Software Foundation. All rights reserved.