| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>ClientSessionFactory (ActiveMQ Artemis Website 2.33.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <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="ClientSessionFactory (ActiveMQ Artemis Website 2.33.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":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> |
| <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/ClientSessionFactory.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="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../allclasses.html">All 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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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"> </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> <a href="package-summary.html">org.apache.activemq.artemis.api.core.client</a></div> |
| <h2 title="Interface ClientSessionFactory" class="title">Interface ClientSessionFactory</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public interface <span class="typeNameLabel">ClientSessionFactory</span> |
| extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></pre> |
| <div class="block">A ClientSessionFactory is the entry point to create and configure ActiveMQ Artemis resources to produce and consume messages. |
| <br> |
| It is possible to configure a factory using the setter methods only if no session has been created. |
| Once a session is created, the configuration is fixed and any call to a setter method will throw an IllegalStateException.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section> |
| <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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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="ClientSessionFactory.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSessionFactory</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addFailoverListener(org.apache.activemq.artemis.api.core.client.FailoverEventListener)">addFailoverListener</a></span>​(<a href="FailoverEventListener.html" title="interface in org.apache.activemq.artemis.api.core.client">FailoverEventListener</a> listener)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds a FailoverEventListener to the session which is notified if a failover event occurs on the session.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cleanup()">cleanup</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Opposed to close, will call cleanup only on every created session and children objects.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Closes this factory and any session created by it.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession()">createSession</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <em>non-transacted</em> session.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(boolean,boolean)">createSession</a></span>​(boolean autoCommitSends, |
| boolean autoCommitAcks)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a session.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(boolean,boolean,boolean)">createSession</a></span>​(boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a session.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(boolean,boolean,boolean,boolean)">createSession</a></span>​(boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a session.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(boolean,boolean,int)">createSession</a></span>​(boolean autoCommitSends, |
| boolean autoCommitAcks, |
| int ackBatchSize)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a session.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,int)">createSession</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> username, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> password, |
| boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge, |
| int ackBatchSize)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an <em>authenticated</em> session.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,int,java.lang.String)">createSession</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> username, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> password, |
| boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge, |
| int ackBatchSize, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> clientID)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an <em>authenticated</em> session.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTransactedSession()">createTransactedSession</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <em>transacted</em> session.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createXASession()">createXASession</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a session with XA transaction semantics.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConnection()">getConnection</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the code connection used by this session factory.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConnectorConfiguration()">getConnectorConfiguration</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Return the configuration used</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="ServerLocator.html" title="interface in org.apache.activemq.artemis.api.core.client">ServerLocator</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getServerLocator()">getServerLocator</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isClosed()">isClosed</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeFailoverListener(org.apache.activemq.artemis.api.core.client.FailoverEventListener)">removeFailoverListener</a></span>​(<a href="FailoverEventListener.html" title="interface in org.apache.activemq.artemis.api.core.client">FailoverEventListener</a> listener)</code></th> |
| <td class="colLast"> |
| <div class="block">Removes a FailoverEventListener to the session.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="createXASession()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createXASession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createXASession() |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a session with XA transaction semantics.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession with XA transaction semantics</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createTransactedSession()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createTransactedSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createTransactedSession() |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a <em>transacted</em> session. |
| <p> |
| It is up to the client to commit when sending and acknowledging messages.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a transacted ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="ClientSession.html#commit()"><code>ClientSession.commit()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession() |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a <em>non-transacted</em> session. |
| Message sends and acknowledgements are automatically committed by the session. <em>This does not |
| mean that messages are automatically acknowledged</em>, only that when messages are acknowledged, |
| the session will automatically commit the transaction containing the acknowledgements.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a non-transacted ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(boolean autoCommitSends, |
| boolean autoCommitAcks) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a session.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(boolean,boolean,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(boolean autoCommitSends, |
| boolean autoCommitAcks, |
| int ackBatchSize) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a session.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dd><code>ackBatchSize</code> - the batch size of the acknowledgements</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(boolean,boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a session.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xa</code> - whether the session support XA transaction semantic or not</dd> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(boolean,boolean,boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates a session. |
| <p> |
| It is possible to <em>pre-acknowledge messages on the server</em> so that the client can avoid additional network trip |
| to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages |
| can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xa</code> - whether the session support XA transaction semantic or not</dd> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dd><code>preAcknowledge</code> - <code>true</code> to pre-acknowledge messages on the server, <code>false</code> to let the client acknowledge the messages</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> username, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> password, |
| boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge, |
| int ackBatchSize) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates an <em>authenticated</em> session. |
| <p> |
| It is possible to <em>pre-acknowledge messages on the server</em> so that the client can avoid additional network trip |
| to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages |
| can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>username</code> - the user name</dd> |
| <dd><code>password</code> - the user password</dd> |
| <dd><code>xa</code> - whether the session support XA transaction semantic or not</dd> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dd><code>preAcknowledge</code> - <code>true</code> to pre-acknowledge messages on the server, <code>false</code> to let the client acknowledge the messages</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature"><a href="ClientSession.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSession</a> createSession​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> username, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> password, |
| boolean xa, |
| boolean autoCommitSends, |
| boolean autoCommitAcks, |
| boolean preAcknowledge, |
| int ackBatchSize, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> clientID) |
| throws <a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></pre> |
| <div class="block">Creates an <em>authenticated</em> session. |
| <p> |
| It is possible to <em>pre-acknowledge messages on the server</em> so that the client can avoid additional network trip |
| to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages |
| can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>username</code> - the user name</dd> |
| <dd><code>password</code> - the user password</dd> |
| <dd><code>xa</code> - whether the session support XA transaction semantic or not</dd> |
| <dd><code>autoCommitSends</code> - <code>true</code> to automatically commit message sends, <code>false</code> to commit manually</dd> |
| <dd><code>autoCommitAcks</code> - <code>true</code> to automatically commit message acknowledgement, <code>false</code> to commit manually</dd> |
| <dd><code>preAcknowledge</code> - <code>true</code> to pre-acknowledge messages on the server, <code>false</code> to let the client acknowledge the messages</dd> |
| <dd><code>clientID</code> - the session clientID</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ClientSession</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ActiveMQException.html" title="class in org.apache.activemq.artemis.api.core">ActiveMQException</a></code> - if an exception occurs while creating the session</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre class="methodSignature">void close()</pre> |
| <div class="block">Closes this factory and any session created by it.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang" class="externalLink">close</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isClosed()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isClosed</h4> |
| <pre class="methodSignature">boolean isClosed()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the factory is closed, <code>false</code> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addFailoverListener(org.apache.activemq.artemis.api.core.client.FailoverEventListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addFailoverListener</h4> |
| <pre class="methodSignature"><a href="ClientSessionFactory.html" title="interface in org.apache.activemq.artemis.api.core.client">ClientSessionFactory</a> addFailoverListener​(<a href="FailoverEventListener.html" title="interface in org.apache.activemq.artemis.api.core.client">FailoverEventListener</a> listener)</pre> |
| <div class="block">Adds a FailoverEventListener to the session which is notified if a failover event occurs on the session.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - the listener to add</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientSessionFactory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="removeFailoverListener(org.apache.activemq.artemis.api.core.client.FailoverEventListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeFailoverListener</h4> |
| <pre class="methodSignature">boolean removeFailoverListener​(<a href="FailoverEventListener.html" title="interface in org.apache.activemq.artemis.api.core.client">FailoverEventListener</a> listener)</pre> |
| <div class="block">Removes a FailoverEventListener to the session.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - the listener to remove</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the listener was removed, <code>false</code> else</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="cleanup()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cleanup</h4> |
| <pre class="methodSignature">void cleanup()</pre> |
| <div class="block">Opposed to close, will call cleanup only on every created session and children objects.</div> |
| </li> |
| </ul> |
| <a id="getServerLocator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServerLocator</h4> |
| <pre class="methodSignature"><a href="ServerLocator.html" title="interface in org.apache.activemq.artemis.api.core.client">ServerLocator</a> getServerLocator()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the server locator associated with this session factory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getConnection()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConnection</h4> |
| <pre class="methodSignature"><a href="../../../spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a> getConnection()</pre> |
| <div class="block">Returns the code connection used by this session factory.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the core connection</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getConnectorConfiguration()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getConnectorConfiguration</h4> |
| <pre class="methodSignature"><a href="../TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a> getConnectorConfiguration()</pre> |
| <div class="block">Return the configuration used</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| </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/ClientSessionFactory.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="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../allclasses.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |