public class ProtonSenderImpl extends Object implements ProtonSender
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.qpid.proton.engine.Link |
link |
| Modifier and Type | Method and Description |
|---|---|
boolean |
advance() |
org.apache.qpid.proton.engine.Record |
attachments()
Retrieves the attachments record, upon which application items can be set/retrieved.
|
T |
close()
Closes the AMQP link, i.e.
|
T |
closeHandler(Handler<AsyncResult<T>> closeHandler)
Sets a handler for when an AMQP Detach frame with closed=true is received from the remote peer.
|
org.apache.qpid.proton.engine.Delivery |
current() |
org.apache.qpid.proton.engine.Delivery |
delivery(byte[] tag) |
org.apache.qpid.proton.engine.Delivery |
delivery(byte[] tag,
int offset,
int length) |
T |
detach()
Detaches the AMQP link, i.e.
|
boolean |
detached() |
T |
detachHandler(Handler<AsyncResult<T>> detachHandler)
Sets a handler for when an AMQP Detach frame with closed=false is received from the remote peer.
|
int |
drained()
Manually mark the link drained, such that if the receiver has requested the link be drained (as indicated by the
value of the
ProtonLink.getDrain() flag) then any remaining credit is discarded and if necessary notice sent to the
receiver indicating it has been. |
void |
free()
Tidies up related link resources when complete with use.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getCondition()
Gets the local ErrorCondition object.
|
int |
getCredit()
Retrieves the current amount of credit.
|
boolean |
getDrain()
Retrieves the current value of link 'drain' flag.
|
org.apache.qpid.proton.engine.EndpointState |
getLocalState() |
org.apache.qpid.proton.amqp.UnsignedLong |
getMaxMessageSize()
Gets the local link max message size.
|
String |
getName()
Retrieves the link name
|
ProtonQoS |
getQoS()
Gets the local QOS config.
|
int |
getQueued()
Retrieves the current number of queued messages.
|
String |
getRemoteAddress()
Retrieves the remote address from the remote terminus (source for receivers, target for senders).
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getRemoteCondition()
Gets the remote ErrorCondition object.
|
int |
getRemoteCredit() |
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteDesiredCapabilities()
Gets the remote desired capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
org.apache.qpid.proton.amqp.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.
|
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteOfferedCapabilities()
Gets the remote offered capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
Map<org.apache.qpid.proton.amqp.Symbol,Object> |
getRemoteProperties()
Gets the remote link properties, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
ProtonQoS |
getRemoteQoS()
Gets the remote QOS config.
|
org.apache.qpid.proton.amqp.transport.Source |
getRemoteSource()
Gets the current remote source config.
|
org.apache.qpid.proton.engine.EndpointState |
getRemoteState() |
org.apache.qpid.proton.amqp.transport.Target |
getRemoteTarget()
Gets the current remote target config.
|
ProtonSessionImpl |
getSession()
Gets the session this link is on.
|
org.apache.qpid.proton.amqp.transport.Source |
getSource()
Gets the current local source config.
|
org.apache.qpid.proton.amqp.transport.Target |
getTarget()
Gets the current local target config.
|
int |
getUnsettled() |
boolean |
isAutoDrained()
Get whether the link will automatically be marked drained after the send queue drain handler fires in drain mode.
|
boolean |
isAutoSettle()
Get whether the receiver is auto settling deliveries.
|
boolean |
isOpen()
Check whether the link is locally open.
|
T |
open()
Opens the AMQP link, i.e.
|
T |
openHandler(Handler<AsyncResult<T>> openHandler)
Sets a handler for when an AMQP Attach frame is received from the remote peer.
|
protected ProtonSenderImpl |
self() |
ProtonDelivery |
send(byte[] tag,
org.apache.qpid.proton.message.Message message)
Send the given message, using the supplied delivery tag when creating the delivery.
|
ProtonDelivery |
send(byte[] tag,
org.apache.qpid.proton.message.Message message,
Handler<ProtonDelivery> onUpdated)
Send the given message, using the supplied delivery tag when creating the delivery, and registering the given
handler to be called whenever the related delivery is updated due to receiving disposition frames from the peer.
|
ProtonDelivery |
send(org.apache.qpid.proton.message.Message message)
Send the given message.
|
ProtonDelivery |
send(org.apache.qpid.proton.message.Message message,
Handler<ProtonDelivery> onUpdated)
Send the given message, registering the given handler to be called whenever the related delivery is updated due to
receiving disposition frames from the peer.
|
ProtonSender |
sendQueueDrainHandler(Handler<ProtonSender> drainHandler)
Sets a handler called when the send queue is not full, i.e.
|
boolean |
sendQueueFull()
Gets whether the senders outgoing send queue is full, i.e.
|
ProtonSender |
setAutoDrained(boolean autoDrained)
Sets whether the link is automatically marked
ProtonSender.drained() after the send queue drain handler callback
returns if the receiving peer requested that credit be drained, as indicated by the value of the
ProtonLink.getDrain() flag. |
ProtonSender |
setAutoSettle(boolean autoSettle)
Sets whether sent deliveries should be automatically locally-settled once they have become remotely-settled by the
receiving peer.
|
T |
setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
Sets the local ErrorCondition object.
|
void |
setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the desired capabilities, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
void |
setMaxMessageSize(org.apache.qpid.proton.amqp.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(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the offered capabilities, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
void |
setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
Sets the link properties, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
T |
setQoS(ProtonQoS qos)
Sets the local QOS config.
|
T |
setSource(org.apache.qpid.proton.amqp.transport.Source source)
Sets the current local source config.
|
T |
setTarget(org.apache.qpid.proton.amqp.transport.Target target)
Sets the current local target config.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattachments, close, closeHandler, detach, detachHandler, free, getCondition, getCredit, getDrain, getMaxMessageSize, getName, getQoS, getQueued, getRemoteCondition, getRemoteDesiredCapabilities, getRemoteMaxMessageSize, getRemoteOfferedCapabilities, getRemoteProperties, getRemoteQoS, getRemoteSource, getRemoteTarget, getSession, getSource, getTarget, isOpen, open, openHandler, setCondition, setDesiredCapabilities, setMaxMessageSize, setOfferedCapabilities, setProperties, setQoS, setSource, setTargetpublic ProtonDelivery send(org.apache.qpid.proton.message.Message message)
ProtonSendersend in interface ProtonSendermessage - the message to sendpublic ProtonDelivery send(org.apache.qpid.proton.message.Message message, Handler<ProtonDelivery> onUpdated)
ProtonSendersend in interface ProtonSendermessage - the message to sendonUpdated - handler called when a disposition update is received for the deliverypublic ProtonDelivery send(byte[] tag, org.apache.qpid.proton.message.Message message)
ProtonSendersend in interface ProtonSendertag - the tag to use for the delivery used to send the messagemessage - the message to sendpublic ProtonDelivery send(byte[] tag, org.apache.qpid.proton.message.Message message, Handler<ProtonDelivery> onUpdated)
ProtonSendersend in interface ProtonSendertag - the tag to use for the delivery used to send the messagemessage - the message to sendonUpdated - handler called when a disposition update is received for the deliverypublic boolean isAutoSettle()
ProtonSenderisAutoSettle in interface ProtonSenderProtonSender.setAutoSettle(boolean)public ProtonSender setAutoSettle(boolean autoSettle)
ProtonSendersetAutoSettle in interface ProtonSenderautoSettle - whether deliveries should be auto settled locally after being settled by the receiverprotected ProtonSenderImpl self()
public boolean sendQueueFull()
ProtonSendersendQueueFull in interface ProtonSenderpublic ProtonSender sendQueueDrainHandler(Handler<ProtonSender> drainHandler)
ProtonSendersendQueueDrainHandler in interface ProtonSenderdrainHandler - the handler to process messagespublic boolean isAutoDrained()
ProtonSenderisAutoDrained in interface ProtonSenderProtonSender.setAutoDrained(boolean)public ProtonSender setAutoDrained(boolean autoDrained)
ProtonSenderProtonSender.drained() after the send queue drain handler callback
returns if the receiving peer requested that credit be drained, as indicated by the value of the
ProtonLink.getDrain() flag.
True by default.setAutoDrained in interface ProtonSenderautoDrained - whether the link will automatically be drained after the send queue drain handler fires in drain modepublic int drained()
ProtonSenderProtonLink.getDrain() flag) then any remaining credit is discarded and if necessary notice sent to the
receiver indicating it has been.
For use when ProtonSender.isAutoDrained() is false.drained in interface ProtonSenderProtonSender.setAutoDrained(boolean)public String getRemoteAddress()
ProtonLinkgetRemoteAddress in interface ProtonLink<ProtonSender>public ProtonSessionImpl getSession()
ProtonLinkgetSession in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.engine.Record attachments()
ProtonLinkattachments in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.amqp.transport.ErrorCondition getCondition()
ProtonLinkgetCondition in interface ProtonLink<T extends ProtonLink<T>>public int getCredit()
ProtonLinkProtonLink.getQueued() to assess the number of credits that will be used by queued messages.getCredit in interface ProtonLink<T extends ProtonLink<T>>public boolean getDrain()
ProtonLinkgetDrain in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.engine.EndpointState getLocalState()
public String getName()
ProtonLinkgetName in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.amqp.transport.ErrorCondition getRemoteCondition()
ProtonLinkgetRemoteCondition in interface ProtonLink<T extends ProtonLink<T>>public int getRemoteCredit()
public org.apache.qpid.proton.engine.EndpointState getRemoteState()
public org.apache.qpid.proton.amqp.transport.Target getRemoteTarget()
ProtonLinkgetRemoteTarget in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.amqp.transport.Target getTarget()
ProtonLinkgetTarget in interface ProtonLink<T extends ProtonLink<T>>public T setTarget(org.apache.qpid.proton.amqp.transport.Target target)
ProtonLinksetTarget in interface ProtonLink<T extends ProtonLink<T>>target - the targetpublic org.apache.qpid.proton.amqp.transport.Source getRemoteSource()
ProtonLinkgetRemoteSource in interface ProtonLink<T extends ProtonLink<T>>public org.apache.qpid.proton.amqp.transport.Source getSource()
ProtonLinkgetSource in interface ProtonLink<T extends ProtonLink<T>>public T setSource(org.apache.qpid.proton.amqp.transport.Source source)
ProtonLinksetSource in interface ProtonLink<T extends ProtonLink<T>>source - the sourcepublic int getUnsettled()
public int getQueued()
ProtonLinkgetQueued in interface ProtonLink<T extends ProtonLink<T>>public boolean advance()
public boolean detached()
public org.apache.qpid.proton.engine.Delivery delivery(byte[] tag,
int offset,
int length)
public org.apache.qpid.proton.engine.Delivery current()
public T setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
ProtonLinksetCondition in interface ProtonLink<T extends ProtonLink<T>>condition - the condition to setpublic org.apache.qpid.proton.engine.Delivery delivery(byte[] tag)
public T open()
ProtonLinkProtonLink.openHandler(Handler) may be used to handle the peer sending their Attach
frame.open in interface ProtonLink<T extends ProtonLink<T>>public T close()
ProtonLinkProtonLink.closeHandler(Handler) should be used to handle the peer
sending their Detach frame with closed=true (and ProtonLink.detachHandler(Handler) can be used to handle the peer
sending their Detach frame with closed=false). When use of the link is complete, i.e it is locally and
remotely closed, ProtonLink.free() must be called to ensure related resources can be tidied up.close in interface ProtonLink<T extends ProtonLink<T>>public T detach()
ProtonLinkProtonLink.detachHandler(Handler) should be used to handle the peer
sending their Detach frame with closed=false (and ProtonLink.closeHandler(Handler) can be used to handle the peer
sending their Detach frame with closed=true). When use of the link is complete, i.e it is locally and
remotely detached, ProtonLink.free() must be called to ensure related resources can be tidied up.detach in interface ProtonLink<T extends ProtonLink<T>>public T openHandler(Handler<AsyncResult<T>> openHandler)
ProtonLinkProtonConnection.senderOpenHandler(Handler) and
ProtonConnection.receiverOpenHandler(Handler).openHandler in interface ProtonLink<T extends ProtonLink<T>>openHandler - the handlerpublic T closeHandler(Handler<AsyncResult<T>> closeHandler)
ProtonLinkcloseHandler in interface ProtonLink<T extends ProtonLink<T>>closeHandler - the handlerpublic T detachHandler(Handler<AsyncResult<T>> detachHandler)
ProtonLinkdetachHandler in interface ProtonLink<T extends ProtonLink<T>>detachHandler - the handlerpublic boolean isOpen()
ProtonLinkisOpen in interface ProtonLink<T extends ProtonLink<T>>public ProtonQoS getQoS()
ProtonLinkgetQoS in interface ProtonLink<T extends ProtonLink<T>>public ProtonQoS getRemoteQoS()
ProtonLinkgetRemoteQoS in interface ProtonLink<T extends ProtonLink<T>>public T setQoS(ProtonQoS qos)
ProtonLinksetQoS in interface ProtonLink<T extends ProtonLink<T>>qos - the QOS to configurepublic org.apache.qpid.proton.amqp.UnsignedLong getMaxMessageSize()
ProtonLinkgetMaxMessageSize in interface ProtonLink<T extends ProtonLink<T>>ProtonLink.setMaxMessageSize(UnsignedLong)public void setMaxMessageSize(org.apache.qpid.proton.amqp.UnsignedLong maxMessageSize)
ProtonLinkProtonLink.open() method.setMaxMessageSize in interface ProtonLink<T extends ProtonLink<T>>maxMessageSize - the local max message size value, or null to clear. 0 also means no limit.public org.apache.qpid.proton.amqp.UnsignedLong getRemoteMaxMessageSize()
ProtonLinkgetRemoteMaxMessageSize in interface ProtonLink<T extends ProtonLink<T>>public Map<org.apache.qpid.proton.amqp.Symbol,Object> getRemoteProperties()
ProtonLinkgetRemoteProperties in interface ProtonLink<T extends ProtonLink<T>>public void setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
ProtonLinkProtonLink.open() method.setProperties in interface ProtonLink<T extends ProtonLink<T>>properties - the properties of the link to be coveyed to the remote peer.public void setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
ProtonLinkProtonLink.open() method.setOfferedCapabilities in interface ProtonLink<T extends ProtonLink<T>>capabilities - the capabilities offered to the remote peer.public org.apache.qpid.proton.amqp.Symbol[] getRemoteOfferedCapabilities()
ProtonLinkgetRemoteOfferedCapabilities in interface ProtonLink<T extends ProtonLink<T>>public void setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
ProtonLinkProtonLink.open() method.setDesiredCapabilities in interface ProtonLink<T extends ProtonLink<T>>capabilities - the capabilities desired of the remote peer.public org.apache.qpid.proton.amqp.Symbol[] getRemoteDesiredCapabilities()
ProtonLinkgetRemoteDesiredCapabilities in interface ProtonLink<T extends ProtonLink<T>>public void free()
ProtonLinkfree in interface ProtonLink<T extends ProtonLink<T>>Copyright © 2020. All rights reserved.