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, setTarget
attachments, close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
current, 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, setTarget
close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
attachments
public void offer(int credits)
Sender
public int send(byte[] bytes, int offset, int length)
Sender
send
in interface Sender
bytes
- 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)
Sender
public int sendNoCopy(ReadableBuffer buffer)
Sender
Care 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 Sender
buffer
- An immutable ReadableBuffer that can be held until the next transport flush.public void abort()
Sender
public boolean advance()
Link
advance
in interface Link
advance
in interface Sender
advance
in class LinkImpl
TODO 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()
Link
credit
count as well as the effect of
any locally queued
messages.getRemoteCredit
in interface Link