blob: bea6db19adf67c3e44daf7bb4894e7f3f60d0feb [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.11) on Wed May 12 10:10:59 EDT 2021 -->
<title>ClientTransactionContext (Qpid ProtonJ2 Parent 1.0.0-M1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ClientTransactionContext (Qpid ProtonJ2 Parent 1.0.0-M1 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":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";
var pathtoroot = "../../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ClientTransactionContext.html">Use</a></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" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.qpid.protonj2.client.impl</a></div>
<h2 title="Interface ClientTransactionContext" class="title">Interface ClientTransactionContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public interface <span class="typeNameLabel">ClientTransactionContext</span></pre>
<div class="block">Base for a Transaction Context used in <a href="ClientSession.html" title="class in org.apache.qpid.protonj2.client.impl"><code>ClientSession</code></a> instances
to mask from the senders and receivers the work of deciding transaction
specific behaviors.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#begin(org.apache.qpid.protonj2.client.futures.ClientFuture)">begin</a></span>&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;beginFuture)</code></th>
<td class="colLast">
<div class="block">Begin a new transaction if one is not already in play.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#commit(org.apache.qpid.protonj2.client.futures.ClientFuture,boolean)">commit</a></span>&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;commitFuture,
boolean&nbsp;startNew)</code></th>
<td class="colLast">
<div class="block">Commits the current transaction if one is active and is not failed into a roll-back only
state.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disposition(org.apache.qpid.protonj2.engine.IncomingDelivery,org.apache.qpid.protonj2.types.transport.DeliveryState,boolean)">disposition</a></span>&#8203;(<a href="../../engine/IncomingDelivery.html" title="interface in org.apache.qpid.protonj2.engine">IncomingDelivery</a>&nbsp;delivery,
<a href="../../types/transport/DeliveryState.html" title="interface in org.apache.qpid.protonj2.types.transport">DeliveryState</a>&nbsp;state,
boolean&nbsp;settled)</code></th>
<td class="colLast">
<div class="block">Apply a disposition to the given delivery wrapping it with a <a href="../../types/transactions/TransactionalState.html" title="class in org.apache.qpid.protonj2.types.transactions"><code>TransactionalState</code></a> outcome
if there is an active transaction.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInTransaction()">isInTransaction</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRollbackOnly()">isRollbackOnly</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rollback(org.apache.qpid.protonj2.client.futures.ClientFuture,boolean)">rollback</a></span>&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;rollbackFuture,
boolean&nbsp;startNew)</code></th>
<td class="colLast">
<div class="block">Rolls back the current transaction if one is active.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#send(org.apache.qpid.protonj2.client.impl.ClientOutgoingEnvelope,org.apache.qpid.protonj2.types.transport.DeliveryState,boolean)">send</a></span>&#8203;(<a href="ClientOutgoingEnvelope.html" title="class in org.apache.qpid.protonj2.client.impl">ClientOutgoingEnvelope</a>&nbsp;envelope,
<a href="../../types/transport/DeliveryState.html" title="interface in org.apache.qpid.protonj2.types.transport">DeliveryState</a>&nbsp;state,
boolean&nbsp;settled)</code></th>
<td class="colLast">
<div class="block">Enlist the given outgoing envelope into this transaction if one is active and not already
in a roll-back only state.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="begin(org.apache.qpid.protonj2.client.futures.ClientFuture)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>begin</h4>
<pre class="methodSignature"><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a>&nbsp;begin&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;beginFuture)
throws <a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></pre>
<div class="block">Begin a new transaction if one is not already in play.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beginFuture</code> - The future that awaits the result of starting the new transaction.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this <a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl"><code>ClientTransactionContext</code></a> instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></code> - if an error occurs do to the transaction state.</dd>
</dl>
</li>
</ul>
<a id="commit(org.apache.qpid.protonj2.client.futures.ClientFuture,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commit</h4>
<pre class="methodSignature"><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a>&nbsp;commit&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;commitFuture,
boolean&nbsp;startNew)
throws <a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></pre>
<div class="block">Commits the current transaction if one is active and is not failed into a roll-back only
state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>commitFuture</code> - The future that awaits the result of committing the new transaction.</dd>
<dd><code>startNew</code> - Should the context immediately initiate a new transaction</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this <a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl"><code>ClientTransactionContext</code></a> instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></code> - if an error occurs do to the transaction state.</dd>
</dl>
</li>
</ul>
<a id="rollback(org.apache.qpid.protonj2.client.futures.ClientFuture,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rollback</h4>
<pre class="methodSignature"><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a>&nbsp;rollback&#8203;(<a href="../futures/ClientFuture.html" title="class in org.apache.qpid.protonj2.client.futures">ClientFuture</a>&lt;<a href="../Session.html" title="interface in org.apache.qpid.protonj2.client">Session</a>&gt;&nbsp;rollbackFuture,
boolean&nbsp;startNew)
throws <a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></pre>
<div class="block">Rolls back the current transaction if one is active.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rollbackFuture</code> - The future that awaits the result of rolling back the new transaction.</dd>
<dd><code>startNew</code> - Should the context immediately initiate a new transaction</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this <a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl"><code>ClientTransactionContext</code></a> instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../exceptions/ClientIllegalStateException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientIllegalStateException</a></code> - if an error occurs do to the transaction state.</dd>
</dl>
</li>
</ul>
<a id="isInTransaction()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInTransaction</h4>
<pre class="methodSignature">boolean&nbsp;isInTransaction()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the context is hosting an active transaction.</dd>
</dl>
</li>
</ul>
<a id="isRollbackOnly()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRollbackOnly</h4>
<pre class="methodSignature">boolean&nbsp;isRollbackOnly()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if there is an active transaction but its state is failed an will roll-back</dd>
</dl>
</li>
</ul>
<a id="send(org.apache.qpid.protonj2.client.impl.ClientOutgoingEnvelope,org.apache.qpid.protonj2.types.transport.DeliveryState,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>send</h4>
<pre class="methodSignature"><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a>&nbsp;send&#8203;(<a href="ClientOutgoingEnvelope.html" title="class in org.apache.qpid.protonj2.client.impl">ClientOutgoingEnvelope</a>&nbsp;envelope,
<a href="../../types/transport/DeliveryState.html" title="interface in org.apache.qpid.protonj2.types.transport">DeliveryState</a>&nbsp;state,
boolean&nbsp;settled)</pre>
<div class="block">Enlist the given outgoing envelope into this transaction if one is active and not already
in a roll-back only state. If the transaction is failed the context should discard the
envelope which should appear to the caller as if the send was successful.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>envelope</code> - The envelope containing the details and mechanisms for sending the message.</dd>
<dd><code>state</code> - The delivery state that is being applied as the outcome of the delivery.</dd>
<dd><code>settled</code> - The settlement value that is being requested for the delivery.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this <a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl"><code>ClientTransactionContext</code></a> instance.</dd>
</dl>
</li>
</ul>
<a id="disposition(org.apache.qpid.protonj2.engine.IncomingDelivery,org.apache.qpid.protonj2.types.transport.DeliveryState,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>disposition</h4>
<pre class="methodSignature"><a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl">ClientTransactionContext</a>&nbsp;disposition&#8203;(<a href="../../engine/IncomingDelivery.html" title="interface in org.apache.qpid.protonj2.engine">IncomingDelivery</a>&nbsp;delivery,
<a href="../../types/transport/DeliveryState.html" title="interface in org.apache.qpid.protonj2.types.transport">DeliveryState</a>&nbsp;state,
boolean&nbsp;settled)</pre>
<div class="block">Apply a disposition to the given delivery wrapping it with a <a href="../../types/transactions/TransactionalState.html" title="class in org.apache.qpid.protonj2.types.transactions"><code>TransactionalState</code></a> outcome
if there is an active transaction. If there is no active transaction than the context will apply
the disposition as requested but if there is an active transaction then the disposition must be
wrapped in a <a href="../../types/transactions/TransactionalState.html" title="class in org.apache.qpid.protonj2.types.transactions"><code>TransactionalState</code></a> and settlement should always enforced by the client.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>delivery</code> - The incoming delivery that the receiver is applying a disposition to.</dd>
<dd><code>state</code> - The delivery state that is being applied as the outcome of the delivery.</dd>
<dd><code>settled</code> - The settlement value that is being requested for the delivery.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this <a href="ClientTransactionContext.html" title="interface in org.apache.qpid.protonj2.client.impl"><code>ClientTransactionContext</code></a> instance.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ClientTransactionContext.html">Use</a></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" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>