blob: e63c94c0b47152a530170f9b8d1582b561175202 [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 (version 1.7.0_55) on Mon Sep 15 17:28:18 CEST 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>IoAcceptor (Apache MINA 2.0.8 API)</title>
<meta name="date" content="2014-09-15">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IoAcceptor (Apache MINA 2.0.8 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/IoAcceptor.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/mina/core/service/DefaultTransportMetadata.html" title="class in org.apache.mina.core.service"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/mina/core/service/IoConnector.html" title="interface in org.apache.mina.core.service"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/mina/core/service/IoAcceptor.html" target="_top">Frames</a></li>
<li><a href="IoAcceptor.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.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>
</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.mina.core.service</div>
<h2 title="Interface IoAcceptor" class="title">Interface IoAcceptor</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</a></dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../../org/apache/mina/transport/socket/DatagramAcceptor.html" title="interface in org.apache.mina.transport.socket">DatagramAcceptor</a>, <a href="../../../../../org/apache/mina/transport/socket/SocketAcceptor.html" title="interface in org.apache.mina.transport.socket">SocketAcceptor</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../org/apache/mina/core/service/AbstractIoAcceptor.html" title="class in org.apache.mina.core.service">AbstractIoAcceptor</a>, <a href="../../../../../org/apache/mina/core/polling/AbstractPollingIoAcceptor.html" title="class in org.apache.mina.core.polling">AbstractPollingIoAcceptor</a>, <a href="../../../../../org/apache/mina/transport/socket/apr/AprSocketAcceptor.html" title="class in org.apache.mina.transport.socket.apr">AprSocketAcceptor</a>, <a href="../../../../../org/apache/mina/transport/socket/nio/NioDatagramAcceptor.html" title="class in org.apache.mina.transport.socket.nio">NioDatagramAcceptor</a>, <a href="../../../../../org/apache/mina/transport/socket/nio/NioSocketAcceptor.html" title="class in org.apache.mina.transport.socket.nio">NioSocketAcceptor</a>, <a href="../../../../../org/apache/mina/transport/vmpipe/VmPipeAcceptor.html" title="class in org.apache.mina.transport.vmpipe">VmPipeAcceptor</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IoAcceptor</span>
extends <a href="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</a></pre>
<div class="block">Accepts incoming connection, communicates with clients, and fires events to
<a href="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service"><code>IoHandler</code></a>s.
<p>
Please refer to
<a href="../../../../../xref-examples/org/apache/mina/examples/echoserver/Main.html">EchoServer</a>
example.
<p>
You should bind to the desired socket address to accept incoming
connections, and then events for incoming connections will be sent to
the specified default <a href="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service"><code>IoHandler</code></a>.
<p>
Threads accept incoming connections start automatically when
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> is invoked, and stop when <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#unbind()"><code>unbind()</code></a> is invoked.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd><a href="http://mina.apache.org">Apache MINA Project</a></dd></dl>
</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()">bind</a></strong>()</code>
<div class="block">Binds to the default local address(es) and start to accept incoming
connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind(java.lang.Iterable)">bind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</code>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind(java.net.SocketAddress...)">bind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;addresses)</code>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind(java.net.SocketAddress)">bind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</code>
<div class="block">Binds to the specified local address and start to accept incoming
connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind(java.net.SocketAddress, java.net.SocketAddress...)">bind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;addresses)</code>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#getDefaultLocalAddress()">getDefaultLocalAddress</a></strong>()</code>
<div class="block">Returns the default local address to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#getDefaultLocalAddresses()">getDefaultLocalAddresses</a></strong>()</code>
<div class="block">Returns a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of the default local addresses to bind when no
argument is specified in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#getLocalAddress()">getLocalAddress</a></strong>()</code>
<div class="block">Returns the local address which is bound currently.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#getLocalAddresses()">getLocalAddresses</a></strong>()</code>
<div class="block">Returns a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><code>Set</code></a> of the local addresses which are bound currently.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#isCloseOnDeactivation()">isCloseOnDeactivation</a></strong>()</code>
<div class="block">Returns <tt>true</tt> if and only if all clients are closed when this
acceptor unbinds from all the related local address (i.e.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#newSession(java.net.SocketAddress, java.net.SocketAddress)">newSession</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;remoteAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</code>
<div class="block">(Optional) Returns an <a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session"><code>IoSession</code></a> that is bound to the specified
<tt>localAddress</tt> and the specified <tt>remoteAddress</tt> which
reuses the local address that is already bound by this service.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setCloseOnDeactivation(boolean)">setCloseOnDeactivation</a></strong>(boolean&nbsp;closeOnDeactivation)</code>
<div class="block">Sets whether all client sessions are closed when this acceptor unbinds
from all the related local addresses (i.e.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setDefaultLocalAddress(java.net.SocketAddress)">setDefaultLocalAddress</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</code>
<div class="block">Sets the default local address to bind when no argument is specified in
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setDefaultLocalAddresses(java.lang.Iterable)">setDefaultLocalAddresses</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</code>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setDefaultLocalAddresses(java.util.List)">setDefaultLocalAddresses</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</code>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setDefaultLocalAddresses(java.net.SocketAddress, java.net.SocketAddress...)">setDefaultLocalAddresses</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;otherLocalAddresses)</code>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#unbind()">unbind</a></strong>()</code>
<div class="block">Unbinds from all local addresses that this service is bound to and stops
to accept incoming connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#unbind(java.lang.Iterable)">unbind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</code>
<div class="block">Unbinds from the specified local addresses and stop to accept incoming
connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#unbind(java.net.SocketAddress)">unbind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</code>
<div class="block">Unbinds from the specified local address and stop to accept incoming
connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#unbind(java.net.SocketAddress, java.net.SocketAddress...)">unbind</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;otherLocalAddresses)</code>
<div class="block">Unbinds from the specified local addresses and stop to accept incoming
connections.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.mina.core.service.IoService">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.mina.core.service.<a href="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</a></h3>
<code><a href="../../../../../org/apache/mina/core/service/IoService.html#addListener(org.apache.mina.core.service.IoServiceListener)">addListener</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#broadcast(java.lang.Object)">broadcast</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#dispose()">dispose</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#dispose(boolean)">dispose</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getActivationTime()">getActivationTime</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getFilterChain()">getFilterChain</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getFilterChainBuilder()">getFilterChainBuilder</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getHandler()">getHandler</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getManagedSessionCount()">getManagedSessionCount</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getManagedSessions()">getManagedSessions</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getScheduledWriteBytes()">getScheduledWriteBytes</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getScheduledWriteMessages()">getScheduledWriteMessages</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getSessionConfig()">getSessionConfig</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getSessionDataStructureFactory()">getSessionDataStructureFactory</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getStatistics()">getStatistics</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#getTransportMetadata()">getTransportMetadata</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#isActive()">isActive</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#isDisposed()">isDisposed</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#isDisposing()">isDisposing</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#removeListener(org.apache.mina.core.service.IoServiceListener)">removeListener</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#setFilterChainBuilder(org.apache.mina.core.filterchain.IoFilterChainBuilder)">setFilterChainBuilder</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#setHandler(org.apache.mina.core.service.IoHandler)">setHandler</a>, <a href="../../../../../org/apache/mina/core/service/IoService.html#setSessionDataStructureFactory(org.apache.mina.core.session.IoSessionDataStructureFactory)">setSessionDataStructureFactory</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getLocalAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;getLocalAddress()</pre>
<div class="block">Returns the local address which is bound currently. If more than one
address are bound, only one of them will be returned, but it's not
necessarily the firstly bound address.</div>
</li>
</ul>
<a name="getLocalAddresses()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddresses</h4>
<pre><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;getLocalAddresses()</pre>
<div class="block">Returns a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><code>Set</code></a> of the local addresses which are bound currently.</div>
</li>
</ul>
<a name="getDefaultLocalAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultLocalAddress</h4>
<pre><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;getDefaultLocalAddress()</pre>
<div class="block">Returns the default local address to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the default will not be
used if any local address is specified. If more than one address are
set, only one of them will be returned, but it's not necessarily the
firstly specified address in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setDefaultLocalAddresses(java.util.List)"><code>setDefaultLocalAddresses(List)</code></a>.</div>
</li>
</ul>
<a name="getDefaultLocalAddresses()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultLocalAddresses</h4>
<pre><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;getDefaultLocalAddresses()</pre>
<div class="block">Returns a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of the default local addresses to bind when no
argument is specified in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the
default will not be used if any local address is specified.</div>
</li>
</ul>
<a name="setDefaultLocalAddress(java.net.SocketAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultLocalAddress</h4>
<pre>void&nbsp;setDefaultLocalAddress(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</pre>
<div class="block">Sets the default local address to bind when no argument is specified in
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the default will not be used
if any local address is specified.</div>
</li>
</ul>
<a name="setDefaultLocalAddresses(java.net.SocketAddress, java.net.SocketAddress...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultLocalAddresses</h4>
<pre>void&nbsp;setDefaultLocalAddresses(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;otherLocalAddresses)</pre>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the default will not be
used if any local address is specified.</div>
</li>
</ul>
<a name="setDefaultLocalAddresses(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultLocalAddresses</h4>
<pre>void&nbsp;setDefaultLocalAddresses(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</pre>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the default will not be
used if any local address is specified.</div>
</li>
</ul>
<a name="setDefaultLocalAddresses(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultLocalAddresses</h4>
<pre>void&nbsp;setDefaultLocalAddresses(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</pre>
<div class="block">Sets the default local addresses to bind when no argument is specified
in <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><code>bind()</code></a> method. Please note that the default will not be
used if any local address is specified.</div>
</li>
</ul>
<a name="isCloseOnDeactivation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCloseOnDeactivation</h4>
<pre>boolean&nbsp;isCloseOnDeactivation()</pre>
<div class="block">Returns <tt>true</tt> if and only if all clients are closed when this
acceptor unbinds from all the related local address (i.e. when the
service is deactivated).</div>
</li>
</ul>
<a name="setCloseOnDeactivation(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCloseOnDeactivation</h4>
<pre>void&nbsp;setCloseOnDeactivation(boolean&nbsp;closeOnDeactivation)</pre>
<div class="block">Sets whether all client sessions are closed when this acceptor unbinds
from all the related local addresses (i.e. when the service is
deactivated). The default value is <tt>true</tt>.</div>
</li>
</ul>
<a name="bind()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>void&nbsp;bind()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Binds to the default local address(es) and start to accept incoming
connections.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to bind</dd></dl>
</li>
</ul>
<a name="bind(java.net.SocketAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>void&nbsp;bind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Binds to the specified local address and start to accept incoming
connections.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>localAddress</code> - The SocketAddress to bind to</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to bind</dd></dl>
</li>
</ul>
<a name="bind(java.net.SocketAddress, java.net.SocketAddress...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>void&nbsp;bind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;addresses)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections. If no address is given, bind on the default local address.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>firstLocalAddress</code> - The first address to bind to</dd><dd><code>addresses</code> - The SocketAddresses to bind to</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to bind</dd></dl>
</li>
</ul>
<a name="bind(java.net.SocketAddress...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>void&nbsp;bind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;addresses)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections. If no address is given, bind on the default local address.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>addresses</code> - The SocketAddresses to bind to</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to bind</dd></dl>
</li>
</ul>
<a name="bind(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>void&nbsp;bind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Binds to the specified local addresses and start to accept incoming
connections.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to bind</dd></dl>
</li>
</ul>
<a name="unbind()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbind</h4>
<pre>void&nbsp;unbind()</pre>
<div class="block">Unbinds from all local addresses that this service is bound to and stops
to accept incoming connections. All managed connections will be closed
if <a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setCloseOnDeactivation(boolean)"><code>disconnectOnUnbind</code></a> property
is <tt>true</tt>. This method returns silently if no local address is
bound yet.</div>
</li>
</ul>
<a name="unbind(java.net.SocketAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbind</h4>
<pre>void&nbsp;unbind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</pre>
<div class="block">Unbinds from the specified local address and stop to accept incoming
connections. All managed connections will be closed if
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setCloseOnDeactivation(boolean)"><code>disconnectOnUnbind</code></a> property is
<tt>true</tt>. This method returns silently if the default local
address is not bound yet.</div>
</li>
</ul>
<a name="unbind(java.net.SocketAddress, java.net.SocketAddress...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbind</h4>
<pre>void&nbsp;unbind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;firstLocalAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>...&nbsp;otherLocalAddresses)</pre>
<div class="block">Unbinds from the specified local addresses and stop to accept incoming
connections. All managed connections will be closed if
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setCloseOnDeactivation(boolean)"><code>disconnectOnUnbind</code></a> property is
<tt>true</tt>. This method returns silently if the default local
addresses are not bound yet.</div>
</li>
</ul>
<a name="unbind(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbind</h4>
<pre>void&nbsp;unbind(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&gt;&nbsp;localAddresses)</pre>
<div class="block">Unbinds from the specified local addresses and stop to accept incoming
connections. All managed connections will be closed if
<a href="../../../../../org/apache/mina/core/service/IoAcceptor.html#setCloseOnDeactivation(boolean)"><code>disconnectOnUnbind</code></a> property is
<tt>true</tt>. This method returns silently if the default local
addresses are not bound yet.</div>
</li>
</ul>
<a name="newSession(java.net.SocketAddress, java.net.SocketAddress)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>newSession</h4>
<pre><a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a>&nbsp;newSession(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;remoteAddress,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</a>&nbsp;localAddress)</pre>
<div class="block">(Optional) Returns an <a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session"><code>IoSession</code></a> that is bound to the specified
<tt>localAddress</tt> and the specified <tt>remoteAddress</tt> which
reuses the local address that is already bound by this service.
<p>
This operation is optional. Please throw <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang"><code>UnsupportedOperationException</code></a>
if the transport type doesn't support this operation. This operation is
usually implemented for connectionless transport types.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if this operation is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this service is not running.</dd>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this service is not bound to the
specified <tt>localAddress</tt>.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/IoAcceptor.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/mina/core/service/DefaultTransportMetadata.html" title="class in org.apache.mina.core.service"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/mina/core/service/IoConnector.html" title="interface in org.apache.mina.core.service"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/mina/core/service/IoAcceptor.html" target="_top">Frames</a></li>
<li><a href="IoAcceptor.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.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>
</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; 2004&#x2013;2014 <a href="http://mina.apache.org/">Apache MINA Project</a>. All rights reserved.</small></p>
</body>
</html>