public interface Sender extends Link
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort the current delivery.
|
boolean |
advance()
Attempts to advance the current delivery.
|
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.
|
current, delivery, delivery, detach, detached, drained, getCredit, getDesiredCapabilities, getDrain, getMaxMessageSize, getName, getOfferedCapabilities, getProperties, getQueued, getReceiverSettleMode, getRemoteCredit, 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
void offer(int credits)
credits
- the number of pending deliveriesint send(byte[] bytes, int offset, int length)
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.int send(ReadableBuffer buffer)
buffer
- the buffer to read the data from.int sendNoCopy(ReadableBuffer buffer)
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.
buffer
- An immutable ReadableBuffer that can be held until the next transport flush.void abort()
boolean advance()
Delivery
have been written.
The application must call this method in order for the delivery to be considered complete.advance
in interface Link
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.