public class SenderImpl extends LinkImpl implements Sender
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort the current delivery.
|
boolean |
advance()
Attempts to advance the current delivery.
|
int |
getRemoteCredit()
|
void |
offer(int credits)
indicates pending deliveries
|
int |
send(byte[] bytes,
int offset,
int length)
Sends some data for the current delivery.
|
int |
send(ReadableBuffer buffer)
Sends some data for the current delivery.
|
int |
sendNoCopy(ReadableBuffer buffer)
Sends data to the current delivery attempting not to copy the data unless a previous
send has already added data to the Delivery in which case a copy may occur depending on
the implementation.
|
void |
setCredit(int credit) |
addCredit, current, delivery, delivery, detach, detached, drained, getConnectionImpl, getCredit, getDesiredCapabilities, getDrain, getMaxMessageSize, getName, getOfferedCapabilities, getProperties, getQueued, getReceiverSettleMode, getRemoteDesiredCapabilities, getRemoteMaxMessageSize, getRemoteOfferedCapabilities, getRemoteProperties, getRemoteReceiverSettleMode, getRemoteSenderSettleMode, getRemoteSource, getRemoteTarget, getSenderSettleMode, getSession, getSource, getTarget, getUnsettled, head, next, setDesiredCapabilities, setMaxMessageSize, setOfferedCapabilities, setProperties, setReceiverSettleMode, setRemoteSenderSettleMode, setSenderSettleMode, setSource, setTargetattachments, close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcurrent, delivery, delivery, detach, detached, drained, getCredit, getDesiredCapabilities, getDrain, getMaxMessageSize, getName, getOfferedCapabilities, getProperties, getQueued, getReceiverSettleMode, getRemoteDesiredCapabilities, getRemoteMaxMessageSize, getRemoteOfferedCapabilities, getRemoteProperties, getRemoteReceiverSettleMode, getRemoteSenderSettleMode, getRemoteSource, getRemoteTarget, getSenderSettleMode, getSession, getSource, getTarget, getUnsettled, head, next, setDesiredCapabilities, setMaxMessageSize, setOfferedCapabilities, setProperties, setReceiverSettleMode, setRemoteSenderSettleMode, setSenderSettleMode, setSource, setTargetclose, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextattachmentspublic void offer(int credits)
Senderpublic int send(byte[] bytes,
int offset,
int length)
Sendersend in interface Senderbytes - the byte array containing the data to be sent.offset - the offset into the given array to start reading.length - the number of bytes to read from the given byte array.public int send(ReadableBuffer buffer)
Senderpublic int sendNoCopy(ReadableBuffer buffer)
SenderCare should be taken when passing ReadableBuffer instances that wrapped pooled bytes as the send does not mean the data will be sent immediately when the transport is flushed so the pooled bytes could be held for longer than expected.
sendNoCopy in interface Senderbuffer - An immutable ReadableBuffer that can be held until the next transport flush.public void abort()
Senderpublic boolean advance()
Linkadvance in interface Linkadvance in interface Senderadvance in class LinkImplTODO fully state the rules regarding when you have to call this method, what happens if you don't call it
before creating another delivery etc.public int getRemoteCredit()
Linkcredit count as well as the effect of
any locally queued messages.getRemoteCredit in interface Link