blob: ec0def0f89a03cb0757ab86db0b1be2068ecc0e6 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Connection (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="Connection (ActiveMQ Artemis Website 2.33.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":18,"i1":6,"i2":6,"i3":6,"i4":18,"i5":6,"i6":18,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":18,"i16":18,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default 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/Connection.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&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>
<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.activemq.artemis.spi.core.remoting</a></div>
<h2 title="Interface Connection" class="title">Interface Connection</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public interface <span class="typeNameLabel">Connection</span></pre>
<div class="block">The connection used by a channel to write data to.</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">&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><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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>default boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#blockUntilWritable(long,java.util.concurrent.TimeUnit)">blockUntilWritable</a></span>&#8203;(long&nbsp;timeout,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Causes the current thread to wait until the connection is writable unless the specified waiting time elapses.</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="#checkFlushBatchBuffer()">checkFlushBatchBuffer</a></span>()</code></th>
<td class="colLast">
<div class="block">Called periodically to flush any data in the batch buffer</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 the connection.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTransportBuffer(int)">createTransportBuffer</a></span>&#8203;(int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">Create a new ActiveMQBuffer of the given size.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>default void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disconnect()">disconnect</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fireReady(boolean)">fireReady</a></span>&#8203;(boolean&nbsp;ready)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>default void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flush()">flush</a></span>()</code></th>
<td class="colLast">
<div class="block">Request to flush any previous written buffers into the wire.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forceClose()">forceClose</a></span>()</code></th>
<td class="colLast">
<div class="block">This should close the internal channel without calling any listeners.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../api/core/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="#getConnectorConfig()">getConnectorConfig</a></span>()</code></th>
<td class="colLast">
<div class="block">Generates a <a href="../../../api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core"><code>TransportConfiguration</code></a> to be used to connect to the same target this is
connected to.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>org.apache.activemq.artemis.core.security.ActiveMQPrincipal</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDefaultActiveMQPrincipal()">getDefaultActiveMQPrincipal</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>io.netty.channel.EventLoop</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEventLoop()">getEventLoop</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getID()">getID</a></span>()</code></th>
<td class="colLast">
<div class="block">returns the unique id of this wire.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocalAddress()">getLocalAddress</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of the local address this connection is connected to.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../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="#getProtocolConnection()">getProtocolConnection</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRemoteAddress()">getRemoteAddress</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of the remote address this connection is connected to.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>default <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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRouter()">getRouter</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>default <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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSNIHostName()">getSNIHostName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDirectDeliver()">isDirectDeliver</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOpen()">isOpen</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSameTarget(org.apache.activemq.artemis.api.core.TransportConfiguration...)">isSameTarget</a></span>&#8203;(<a href="../../../api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a>...&nbsp;configs)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isUsingProtocolHandling()">isUsingProtocolHandling</a></span>()</code></th>
<td class="colLast">
<div class="block">the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel
we will use this method Instead of using instanceof</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener)">isWritable</a></span>&#8203;(<a href="ReadyListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting">ReadyListener</a>&nbsp;listener)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAutoRead(boolean)">setAutoRead</a></span>&#8203;(boolean&nbsp;autoRead)</code></th>
<td class="colLast">
<div class="block">This will disable reading from the channel.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setProtocolConnection(org.apache.activemq.artemis.spi.core.protocol.RemotingConnection)">setProtocolConnection</a></span>&#8203;(<a href="../protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;connection)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.apache.activemq.artemis.api.core.ActiveMQBuffer)">write</a></span>&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">writes the buffer to the connection with no flushing or batching</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean)">write</a></span>&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;requestFlush)</code></th>
<td class="colLast">
<div class="block">writes the buffer to the connection and if flush is true request to flush the buffer
(and any previous un-flushed ones) into the wire.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean,boolean)">write</a></span>&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;flush,
boolean&nbsp;batched)</code></th>
<td class="colLast">
<div class="block">writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean,boolean,io.netty.channel.ChannelFutureListener)">write</a></span>&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;flush,
boolean&nbsp;batched,
io.netty.channel.ChannelFutureListener&nbsp;futureListener)</code></th>
<td class="colLast">
<div class="block">writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.</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="createTransportBuffer(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTransportBuffer</h4>
<pre class="methodSignature"><a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;createTransportBuffer&#8203;(int&nbsp;size)</pre>
<div class="block">Create a new ActiveMQBuffer of the given size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the size of buffer to create</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new buffer.</dd>
</dl>
</li>
</ul>
<a id="getProtocolConnection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProtocolConnection</h4>
<pre class="methodSignature"><a href="../protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;getProtocolConnection()</pre>
</li>
</ul>
<a id="setProtocolConnection(org.apache.activemq.artemis.spi.core.protocol.RemotingConnection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProtocolConnection</h4>
<pre class="methodSignature">void&nbsp;setProtocolConnection&#8203;(<a href="../protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;connection)</pre>
</li>
</ul>
<a id="isWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWritable</h4>
<pre class="methodSignature">boolean&nbsp;isWritable&#8203;(<a href="ReadyListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting">ReadyListener</a>&nbsp;listener)</pre>
</li>
</ul>
<a id="isOpen()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOpen</h4>
<pre class="methodSignature">boolean&nbsp;isOpen()</pre>
</li>
</ul>
<a id="blockUntilWritable(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockUntilWritable</h4>
<pre class="methodSignature">default&nbsp;boolean&nbsp;blockUntilWritable&#8203;(long&nbsp;timeout,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Causes the current thread to wait until the connection is writable unless the specified waiting time elapses.
The available capacity of the connection could change concurrently hence this method is suitable to perform precise flow-control
only in a single writer case, while its precision decrease inversely proportional with the rate and the number of concurrent writers.
If the current thread is not allowed to block the timeout will be ignored dependently on the connection type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeout</code> - the maximum time to wait</dd>
<dd><code>timeUnit</code> - the time unit of the timeout argument</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the connection is writable, <code>false</code> otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - if the connection is closed</dd>
</dl>
</li>
</ul>
<a id="fireReady(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireReady</h4>
<pre class="methodSignature">void&nbsp;fireReady&#8203;(boolean&nbsp;ready)</pre>
</li>
</ul>
<a id="setAutoRead(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAutoRead</h4>
<pre class="methodSignature">void&nbsp;setAutoRead&#8203;(boolean&nbsp;autoRead)</pre>
<div class="block">This will disable reading from the channel.
This is basically the same as blocking the reading.</div>
</li>
</ul>
<a id="getID()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getID</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;getID()</pre>
<div class="block">returns the unique id of this wire.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the id</dd>
</dl>
</li>
</ul>
<a id="getEventLoop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventLoop</h4>
<pre class="methodSignature">io.netty.channel.EventLoop&nbsp;getEventLoop()</pre>
</li>
</ul>
<a id="write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre class="methodSignature">void&nbsp;write&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;requestFlush)</pre>
<div class="block">writes the buffer to the connection and if flush is true request to flush the buffer
(and any previous un-flushed ones) into the wire.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffer to write</dd>
<dd><code>requestFlush</code> - whether to request flush onto the wire</dd>
</dl>
</li>
</ul>
<a id="flush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre class="methodSignature">default&nbsp;void&nbsp;flush()</pre>
<div class="block">Request to flush any previous written buffers into the wire.</div>
</li>
</ul>
<a id="write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre class="methodSignature">void&nbsp;write&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;flush,
boolean&nbsp;batched)</pre>
<div class="block">writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffer to write</dd>
<dd><code>flush</code> - whether to flush the buffers onto the wire</dd>
<dd><code>batched</code> - whether the packet is allowed to batched for better performance</dd>
</dl>
</li>
</ul>
<a id="write(org.apache.activemq.artemis.api.core.ActiveMQBuffer,boolean,boolean,io.netty.channel.ChannelFutureListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre class="methodSignature">void&nbsp;write&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;flush,
boolean&nbsp;batched,
io.netty.channel.ChannelFutureListener&nbsp;futureListener)</pre>
<div class="block">writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffer to write</dd>
<dd><code>flush</code> - whether to flush the buffers onto the wire</dd>
<dd><code>batched</code> - whether the packet is allowed to batched for better performance</dd>
</dl>
</li>
</ul>
<a id="write(org.apache.activemq.artemis.api.core.ActiveMQBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre class="methodSignature">void&nbsp;write&#8203;(<a href="../../../api/core/ActiveMQBuffer.html" title="interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer)</pre>
<div class="block">writes the buffer to the connection with no flushing or batching</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffer to write</dd>
</dl>
</li>
</ul>
<a id="forceClose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceClose</h4>
<pre class="methodSignature">void&nbsp;forceClose()</pre>
<div class="block">This should close the internal channel without calling any listeners.
This is to avoid a situation where the broker is busy writing on an internal thread.
This should close the socket releasing any pending threads.</div>
</li>
</ul>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">void&nbsp;close()</pre>
<div class="block">Closes the connection.</div>
</li>
</ul>
<a id="disconnect()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disconnect</h4>
<pre class="methodSignature">default&nbsp;void&nbsp;disconnect()</pre>
</li>
</ul>
<a id="getRemoteAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteAddress</h4>
<pre class="methodSignature"><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>&nbsp;getRemoteAddress()</pre>
<div class="block">Returns a string representation of the remote address this connection is connected to.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the remote address</dd>
</dl>
</li>
</ul>
<a id="getLocalAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre class="methodSignature"><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>&nbsp;getLocalAddress()</pre>
<div class="block">Returns a string representation of the local address this connection is connected to.
This is useful when the server is configured at 0.0.0.0 (or multiple IPs).
This will give you the actual IP that's being used.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the local address</dd>
</dl>
</li>
</ul>
<a id="checkFlushBatchBuffer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkFlushBatchBuffer</h4>
<pre class="methodSignature">void&nbsp;checkFlushBatchBuffer()</pre>
<div class="block">Called periodically to flush any data in the batch buffer</div>
</li>
</ul>
<a id="getConnectorConfig()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectorConfig</h4>
<pre class="methodSignature"><a href="../../../api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a>&nbsp;getConnectorConfig()</pre>
<div class="block">Generates a <a href="../../../api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core"><code>TransportConfiguration</code></a> to be used to connect to the same target this is
connected to.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>TransportConfiguration</dd>
</dl>
</li>
</ul>
<a id="isDirectDeliver()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirectDeliver</h4>
<pre class="methodSignature">boolean&nbsp;isDirectDeliver()</pre>
</li>
</ul>
<a id="getDefaultActiveMQPrincipal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultActiveMQPrincipal</h4>
<pre class="methodSignature">org.apache.activemq.artemis.core.security.ActiveMQPrincipal&nbsp;getDefaultActiveMQPrincipal()</pre>
</li>
</ul>
<a id="isUsingProtocolHandling()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUsingProtocolHandling</h4>
<pre class="methodSignature">boolean&nbsp;isUsingProtocolHandling()</pre>
<div class="block">the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel
we will use this method Instead of using instanceof</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
</dl>
</li>
</ul>
<a id="isSameTarget(org.apache.activemq.artemis.api.core.TransportConfiguration...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameTarget</h4>
<pre class="methodSignature">boolean&nbsp;isSameTarget&#8203;(<a href="../../../api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a>...&nbsp;configs)</pre>
</li>
</ul>
<a id="getSNIHostName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSNIHostName</h4>
<pre class="methodSignature">default&nbsp;<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>&nbsp;getSNIHostName()</pre>
</li>
</ul>
<a id="getRouter()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getRouter</h4>
<pre class="methodSignature">default&nbsp;<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>&nbsp;getRouter()</pre>
</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/Connection.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&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; 2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>