blob: e3b7bc39bcec3da2b50dc15af2c801423ac590e5 [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 (1.8.0_151) on Fri Jan 10 08:51:25 CST 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Connection (ActiveMQ Artemis Web 2.11.0 API)</title>
<meta name="date" content="2020-01-10">
<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 Web 2.11.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":18,"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,"i17":6,"i18":6,"i19":6,"i20":6,"i21":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>
<!-- ========= 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="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="../../../../../../../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/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.html" title="interface in org.apache.activemq.artemis.spi.core.remoting"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/activemq/artemis/spi/core/remoting/Connection.html" target="_top">Frames</a></li>
<li><a href="Connection.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.activemq.artemis.spi.core.remoting</div>
<h2 title="Interface Connection" class="title">Interface Connection</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<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 =========== -->
<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><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="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>default boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#blockUntilWritable-int-long-java.util.concurrent.TimeUnit-">blockUntilWritable</a></span>(int&nbsp;requiredCapacity,
long&nbsp;timeout,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;timeUnit)</code>
<div class="block">Causes the current thread to wait until the connection can enqueue the required capacity unless the specified waiting time elapses.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#checkFlushBatchBuffer--">checkFlushBatchBuffer</a></span>()</code>
<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>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#close--">close</a></span>()</code>
<div class="block">Closes the connection.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#createTransportBuffer-int-">createTransportBuffer</a></span>(int&nbsp;size)</code>
<div class="block">Create a new ActiveMQBuffer of the given size.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#fireReady-boolean-">fireReady</a></span>(boolean&nbsp;ready)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#forceClose--">forceClose</a></span>()</code>
<div class="block">This should close the internal channel without calling any listeners.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/activemq/artemis/api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getConnectorConfig--">getConnectorConfig</a></span>()</code>
<div class="block">Generates a <a href="../../../../../../../org/apache/activemq/artemis/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="i7" class="rowColor">
<td class="colFirst"><code>org.apache.activemq.artemis.core.security.ActiveMQPrincipal</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getDefaultActiveMQPrincipal--">getDefaultActiveMQPrincipal</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getID--">getID</a></span>()</code>
<div class="block">returns the unique id of this wire.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getLocalAddress--">getLocalAddress</a></span>()</code>
<div class="block">Returns a string representation of the local address this connection is connected to.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getProtocolConnection--">getProtocolConnection</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#getRemoteAddress--">getRemoteAddress</a></span>()</code>
<div class="block">Returns a string representation of the remote address this connection is connected to.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#isDirectDeliver--">isDirectDeliver</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#isOpen--">isOpen</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#isSameTarget-org.apache.activemq.artemis.api.core.TransportConfiguration...-">isSameTarget</a></span>(<a href="../../../../../../../org/apache/activemq/artemis/api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a>...&nbsp;configs)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#isUsingProtocolHandling--">isUsingProtocolHandling</a></span>()</code>
<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="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#isWritable-org.apache.activemq.artemis.spi.core.remoting.ReadyListener-">isWritable</a></span>(<a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/ReadyListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting">ReadyListener</a>&nbsp;listener)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#setAutoRead-boolean-">setAutoRead</a></span>(boolean&nbsp;autoRead)</code>
<div class="block">This will disable reading from the channel.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#setProtocolConnection-org.apache.activemq.artemis.spi.core.protocol.RemotingConnection-">setProtocolConnection</a></span>(<a href="../../../../../../../org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;connection)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#write-org.apache.activemq.artemis.api.core.ActiveMQBuffer-">write</a></span>(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer)</code>
<div class="block">writes the buffer to the connection with no flushing or batching</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#write-org.apache.activemq.artemis.api.core.ActiveMQBuffer-boolean-boolean-">write</a></span>(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;buffer,
boolean&nbsp;flush,
boolean&nbsp;batched)</code>
<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="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/Connection.html#write-org.apache.activemq.artemis.api.core.ActiveMQBuffer-boolean-boolean-io.netty.channel.ChannelFutureListener-">write</a></span>(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or 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>
<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>
</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="createTransportBuffer-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTransportBuffer</h4>
<pre><a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or interface in org.apache.activemq.artemis.api.core">ActiveMQBuffer</a>&nbsp;createTransportBuffer(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 name="getProtocolConnection--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProtocolConnection</h4>
<pre><a href="../../../../../../../org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;getProtocolConnection()</pre>
</li>
</ul>
<a name="setProtocolConnection-org.apache.activemq.artemis.spi.core.protocol.RemotingConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProtocolConnection</h4>
<pre>void&nbsp;setProtocolConnection(<a href="../../../../../../../org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.html" title="interface in org.apache.activemq.artemis.spi.core.protocol">RemotingConnection</a>&nbsp;connection)</pre>
</li>
</ul>
<a name="isWritable-org.apache.activemq.artemis.spi.core.remoting.ReadyListener-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWritable</h4>
<pre>boolean&nbsp;isWritable(<a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/ReadyListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting">ReadyListener</a>&nbsp;listener)</pre>
</li>
</ul>
<a name="isOpen--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOpen</h4>
<pre>boolean&nbsp;isOpen()</pre>
</li>
</ul>
<a name="blockUntilWritable-int-long-java.util.concurrent.TimeUnit-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockUntilWritable</h4>
<pre>default&nbsp;boolean&nbsp;blockUntilWritable(int&nbsp;requiredCapacity,
long&nbsp;timeout,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Causes the current thread to wait until the connection can enqueue the required capacity 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>requiredCapacity</code> - the capacity in bytes to be enqueued</dd>
<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 can enqueue <code>requiredCapacity</code> bytes, <code>false</code> otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the connection is closed</dd>
</dl>
</li>
</ul>
<a name="fireReady-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireReady</h4>
<pre>void&nbsp;fireReady(boolean&nbsp;ready)</pre>
</li>
</ul>
<a name="setAutoRead-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAutoRead</h4>
<pre>void&nbsp;setAutoRead(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 name="getID--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getID</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">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 name="write-org.apache.activemq.artemis.api.core.ActiveMQBuffer-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>void&nbsp;write(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or 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 name="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>void&nbsp;write(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or 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 name="write-org.apache.activemq.artemis.api.core.ActiveMQBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>void&nbsp;write(<a href="http://apache.org/activemq/artemis-core-client/apidocs/org/apache/activemq/artemis/api/core/ActiveMQBuffer.html?is-external=true" title="class or 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 name="forceClose--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceClose</h4>
<pre>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 name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()</pre>
<div class="block">Closes the connection.</div>
</li>
</ul>
<a name="getRemoteAddress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteAddress</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">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 name="getLocalAddress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">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 name="checkFlushBatchBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkFlushBatchBuffer</h4>
<pre>void&nbsp;checkFlushBatchBuffer()</pre>
<div class="block">Called periodically to flush any data in the batch buffer</div>
</li>
</ul>
<a name="getConnectorConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectorConfig</h4>
<pre><a href="../../../../../../../org/apache/activemq/artemis/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="../../../../../../../org/apache/activemq/artemis/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 name="isDirectDeliver--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirectDeliver</h4>
<pre>boolean&nbsp;isDirectDeliver()</pre>
</li>
</ul>
<a name="getDefaultActiveMQPrincipal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultActiveMQPrincipal</h4>
<pre>org.apache.activemq.artemis.core.security.ActiveMQPrincipal&nbsp;getDefaultActiveMQPrincipal()</pre>
</li>
</ul>
<a name="isUsingProtocolHandling--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUsingProtocolHandling</h4>
<pre>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 name="isSameTarget-org.apache.activemq.artemis.api.core.TransportConfiguration...-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isSameTarget</h4>
<pre>boolean&nbsp;isSameTarget(<a href="../../../../../../../org/apache/activemq/artemis/api/core/TransportConfiguration.html" title="class in org.apache.activemq.artemis.api.core">TransportConfiguration</a>...&nbsp;configs)</pre>
</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="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="../../../../../../../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/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.html" title="interface in org.apache.activemq.artemis.spi.core.remoting"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.html" title="interface in org.apache.activemq.artemis.spi.core.remoting"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/activemq/artemis/spi/core/remoting/Connection.html" target="_top">Frames</a></li>
<li><a href="Connection.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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>