blob: 4649455a6d2779f9ae31037918f074d2aac7de4b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Sender (Qpid Proton-J API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Sender (Qpid Proton-J API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/qpid/proton/engine/SaslListener.html" title="interface in org.apache.qpid.proton.engine"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/qpid/proton/engine/Session.html" title="interface in org.apache.qpid.proton.engine"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/qpid/proton/engine/Sender.html" target="_top">Frames</a></li>
<li><a href="Sender.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.qpid.proton.engine</div>
<h2 title="Interface Sender" class="title">Interface Sender</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html" title="interface in org.apache.qpid.proton.engine">Endpoint</a>, <a href="../../../../../org/apache/qpid/proton/engine/Extendable.html" title="interface in org.apache.qpid.proton.engine">Extendable</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html" title="interface in org.apache.qpid.proton.engine">Link</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../org/apache/qpid/proton/engine/impl/SenderImpl.html" title="class in org.apache.qpid.proton.engine.impl">SenderImpl</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Sender</span>
extends <a href="../../../../../org/apache/qpid/proton/engine/Link.html" title="interface in org.apache.qpid.proton.engine">Link</a></pre>
<div class="block">Sender</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#abort--">abort</a></span>()</code>
<div class="block">Abort the current delivery.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#advance--">advance</a></span>()</code>
<div class="block">Attempts to advance the current delivery.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#offer-int-">offer</a></span>(int&nbsp;credits)</code>
<div class="block">indicates pending deliveries</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#send-byte:A-int-int-">send</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Sends some data for the current delivery.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#send-org.apache.qpid.proton.codec.ReadableBuffer-">send</a></span>(<a href="../../../../../org/apache/qpid/proton/codec/ReadableBuffer.html" title="interface in org.apache.qpid.proton.codec">ReadableBuffer</a>&nbsp;buffer)</code>
<div class="block">Sends some data for the current delivery.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#sendNoCopy-org.apache.qpid.proton.codec.ReadableBuffer-">sendNoCopy</a></span>(<a href="../../../../../org/apache/qpid/proton/codec/ReadableBuffer.html" title="interface in org.apache.qpid.proton.codec">ReadableBuffer</a>&nbsp;buffer)</code>
<div class="block">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.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.qpid.proton.engine.Link">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.qpid.proton.engine.<a href="../../../../../org/apache/qpid/proton/engine/Link.html" title="interface in org.apache.qpid.proton.engine">Link</a></h3>
<code><a href="../../../../../org/apache/qpid/proton/engine/Link.html#current--">current</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#delivery-byte:A-">delivery</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#delivery-byte:A-int-int-">delivery</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#detach--">detach</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#detached--">detached</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#drained--">drained</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getCredit--">getCredit</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getDesiredCapabilities--">getDesiredCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getDrain--">getDrain</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getMaxMessageSize--">getMaxMessageSize</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getName--">getName</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getOfferedCapabilities--">getOfferedCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getProperties--">getProperties</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getQueued--">getQueued</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getReceiverSettleMode--">getReceiverSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteCredit--">getRemoteCredit</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteDesiredCapabilities--">getRemoteDesiredCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteMaxMessageSize--">getRemoteMaxMessageSize</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteOfferedCapabilities--">getRemoteOfferedCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteProperties--">getRemoteProperties</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteReceiverSettleMode--">getRemoteReceiverSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteSenderSettleMode--">getRemoteSenderSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteSource--">getRemoteSource</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getRemoteTarget--">getRemoteTarget</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getSenderSettleMode--">getSenderSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getSession--">getSession</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getSource--">getSource</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getTarget--">getTarget</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#getUnsettled--">getUnsettled</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#head--">head</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#next-java.util.EnumSet-java.util.EnumSet-">next</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setDesiredCapabilities-org.apache.qpid.proton.amqp.Symbol:A-">setDesiredCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setMaxMessageSize-org.apache.qpid.proton.amqp.UnsignedLong-">setMaxMessageSize</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setOfferedCapabilities-org.apache.qpid.proton.amqp.Symbol:A-">setOfferedCapabilities</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setProperties-java.util.Map-">setProperties</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setReceiverSettleMode-org.apache.qpid.proton.amqp.transport.ReceiverSettleMode-">setReceiverSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setRemoteSenderSettleMode-org.apache.qpid.proton.amqp.transport.SenderSettleMode-">setRemoteSenderSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setSenderSettleMode-org.apache.qpid.proton.amqp.transport.SenderSettleMode-">setSenderSettleMode</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setSource-org.apache.qpid.proton.amqp.transport.Source-">setSource</a>, <a href="../../../../../org/apache/qpid/proton/engine/Link.html#setTarget-org.apache.qpid.proton.amqp.transport.Target-">setTarget</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.qpid.proton.engine.Endpoint">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.qpid.proton.engine.<a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html" title="interface in org.apache.qpid.proton.engine">Endpoint</a></h3>
<code><a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#close--">close</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#free--">free</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#getCondition--">getCondition</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#getContext--">getContext</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#getLocalState--">getLocalState</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#getRemoteCondition--">getRemoteCondition</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#getRemoteState--">getRemoteState</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#open--">open</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#setCondition-org.apache.qpid.proton.amqp.transport.ErrorCondition-">setCondition</a>, <a href="../../../../../org/apache/qpid/proton/engine/Endpoint.html#setContext-java.lang.Object-">setContext</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.qpid.proton.engine.Extendable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.qpid.proton.engine.<a href="../../../../../org/apache/qpid/proton/engine/Extendable.html" title="interface in org.apache.qpid.proton.engine">Extendable</a></h3>
<code><a href="../../../../../org/apache/qpid/proton/engine/Extendable.html#attachments--">attachments</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="offer-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offer</h4>
<pre>void&nbsp;offer(int&nbsp;credits)</pre>
<div class="block">indicates pending deliveries</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>credits</code> - the number of pending deliveries</dd>
</dl>
</li>
</ul>
<a name="send-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>send</h4>
<pre>int&nbsp;send(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Sends some data for the current delivery. The application may call this method multiple
times for the same delivery.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array containing the data to be sent.</dd>
<dd><code>offset</code> - the offset into the given array to start reading.</dd>
<dd><code>length</code> - the number of bytes to read from the given byte array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes accepted
TODO Proton-j current copies all the bytes it has been given so the return value will always be
length. Should this be changed? How does Proton-c behave? What should the application do if
the number of bytes accepted is smaller than length.</dd>
</dl>
</li>
</ul>
<a name="send-org.apache.qpid.proton.codec.ReadableBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>send</h4>
<pre>int&nbsp;send(<a href="../../../../../org/apache/qpid/proton/codec/ReadableBuffer.html" title="interface in org.apache.qpid.proton.codec">ReadableBuffer</a>&nbsp;buffer)</pre>
<div class="block">Sends some data for the current delivery. The application may call this method multiple
times for the same delivery.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffer to read the data from.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes read from the provided buffer.</dd>
</dl>
</li>
</ul>
<a name="sendNoCopy-org.apache.qpid.proton.codec.ReadableBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendNoCopy</h4>
<pre>int&nbsp;sendNoCopy(<a href="../../../../../org/apache/qpid/proton/codec/ReadableBuffer.html" title="interface in org.apache.qpid.proton.codec">ReadableBuffer</a>&nbsp;buffer)</pre>
<div class="block">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.
<p>
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.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - An immutable ReadableBuffer that can be held until the next transport flush.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes read from the provided buffer.</dd>
</dl>
</li>
</ul>
<a name="abort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>abort</h4>
<pre>void&nbsp;abort()</pre>
<div class="block">Abort the current delivery.
Note "pn_link_abort" is commented out in the .h</div>
</li>
</ul>
<a name="advance--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>advance</h4>
<pre>boolean&nbsp;advance()</pre>
<div class="block">Attempts to advance the current delivery. Advances it to the next delivery if one exists, else null.
The behaviour of this method is different for senders and receivers.
Informs the sender that all the bytes of the current <a href="../../../../../org/apache/qpid/proton/engine/Delivery.html" title="interface in org.apache.qpid.proton.engine"><code>Delivery</code></a> have been written.
The application must call this method in order for the delivery to be considered complete.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/qpid/proton/engine/Link.html#advance--">advance</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/qpid/proton/engine/Link.html" title="interface in org.apache.qpid.proton.engine">Link</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if it can advance, false if it cannot
TODO document the meaning of the return value more fully. Currently Senderimpl only returns false if there is no current delivery</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/qpid/proton/engine/Sender.html#send-byte:A-int-int-"><code>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.</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/qpid/proton/engine/SaslListener.html" title="interface in org.apache.qpid.proton.engine"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/qpid/proton/engine/Session.html" title="interface in org.apache.qpid.proton.engine"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/qpid/proton/engine/Sender.html" target="_top">Frames</a></li>
<li><a href="Sender.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>