/server/Uconnocalypse/lib/netty-3.5.8.Final-api/org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html
HTML | 508 lines | 447 code | 8 blank | 53 comment | 0 complexity | ff8975f73ca5229b14b5c842257a1e61 MD5 | raw file
- <!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_04-ea) on Sat Sep 29 09:36:55 CEST 2012 -->
- <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
- <title>NioDatagramChannelFactory (The Netty Project API Reference (3.5.8.Final))</title>
- <meta name="date" content="2012-09-29">
- <meta name="keywords" content="org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory class">
- <meta name="keywords" content="newChannel()">
- <meta name="keywords" content="releaseExternalResources()">
- <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="NioDatagramChannelFactory (The Netty Project API Reference (3.5.8.Final))";
- }
- //-->
- </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/NioDatagramChannelFactory.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/jboss/netty/channel/socket/nio/NioDatagramChannelConfig.html" title="interface in org.jboss.netty.channel.socket.nio"><span class="strong">Prev Class</span></a></li>
- <li><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio"><span class="strong">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../../../index.html?org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" target="_top">Frames</a></li>
- <li><a href="NioDatagramChannelFactory.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: </li>
- <li>Nested | </li>
- <li>Field | </li>
- <li><a href="#constructor_summary">Constr</a> | </li>
- <li><a href="#method_summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor_detail">Constr</a> | </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.jboss.netty.channel.socket.nio</div>
- <h2 title="Class NioDatagramChannelFactory" class="title">Class NioDatagramChannelFactory</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
- <li>
- <ul class="inheritance">
- <li>org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory</li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>All Implemented Interfaces:</dt>
- <dd><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html" title="interface in org.jboss.netty.channel">ChannelFactory</a>, <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket">DatagramChannelFactory</a>, <a href="../../../../../../org/jboss/netty/util/ExternalResourceReleasable.html" title="interface in org.jboss.netty.util">ExternalResourceReleasable</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public class <span class="strong">NioDatagramChannelFactory</span>
- extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
- implements <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket">DatagramChannelFactory</a></pre>
- <div class="block">A <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket"><code>DatagramChannelFactory</code></a> that creates a NIO-based connectionless
- <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannel.html" title="interface in org.jboss.netty.channel.socket"><code>DatagramChannel</code></a>. It utilizes the non-blocking I/O mode which
- was introduced with NIO to serve many number of concurrent connections
- efficiently.
- <h3>How threads work</h3>
- <p>
- There is only one thread type in a <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a>;
- worker threads.
- <h4>Worker threads</h4>
- <p>
- One <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> can have one or more worker
- threads. A worker thread performs non-blocking read and write for one or
- more <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannel.html" title="interface in org.jboss.netty.channel.socket"><code>DatagramChannel</code></a>s in a non-blocking mode.
- <h3>Life cycle of threads and graceful shutdown</h3>
- <p>
- All worker threads are acquired from the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> which was specified
- when a <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> was created. Therefore, you should
- make sure the specified <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> is able to lend the sufficient
- number of threads. It is the best bet to specify
- <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html?is-external=true#newCachedThreadPool()" title="class or interface in java.util.concurrent">a cached thread pool</a>.
- <p>
- All worker threads are acquired lazily, and then released when there's
- nothing left to process. All the related resources such as <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true" title="class or interface in java.nio.channels"><code>Selector</code></a>
- are also released when the worker threads are released. Therefore, to shut
- down a service gracefully, you should do the following:
- <ol>
- <li>close all channels created by the factory usually using
- <a href="../../../../../../org/jboss/netty/channel/group/ChannelGroup.html#close()"><code>ChannelGroup.close()</code></a>, and</li>
- <li>call <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()"><code>releaseExternalResources()</code></a>.</li>
- </ol>
- Please make sure not to shut down the executor until all channels are
- closed. Otherwise, you will end up with a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/RejectedExecutionException.html?is-external=true" title="class or interface in java.util.concurrent"><code>RejectedExecutionException</code></a>
- and the related resources might not be released properly.
- <h3>Limitation</h3>
- <p>
- Multicast is not supported. Please use <a href="../../../../../../org/jboss/netty/channel/socket/oio/OioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.oio"><code>OioDatagramChannelFactory</code></a>
- instead.</div>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor_summary">
- <!-- -->
- </a>
- <h3>Constructor Summary</h3>
- <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
- <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colOne" scope="col">Constructor and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory()">NioDatagramChannelFactory</a></strong>()</code>
- <div class="block">Create a new <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> with a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html?is-external=true#newCachedThreadPool()" title="class or interface in java.util.concurrent"><code>Executors.newCachedThreadPool()</code></a>
- and without preferred <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a>.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)">NioDatagramChannelFactory</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, int)">NioDatagramChannelFactory</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- int workerCount)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, org.jboss.netty.channel.socket.InternetProtocolFamily)">NioDatagramChannelFactory</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, int, org.jboss.netty.channel.socket.InternetProtocolFamily)">NioDatagramChannelFactory</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- int workerCount,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(org.jboss.netty.channel.socket.InternetProtocolFamily)">NioDatagramChannelFactory</a></strong>(<a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</code>
- <div class="block">Create a new <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> with a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html?is-external=true#newCachedThreadPool()" title="class or interface in java.util.concurrent"><code>Executors.newCachedThreadPool()</code></a>.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool)">NioDatagramChannelFactory</a></strong>(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a><<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>> workerPool)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool, org.jboss.netty.channel.socket.InternetProtocolFamily)">NioDatagramChannelFactory</a></strong>(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a><<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>> workerPool,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</code>
- <div class="block">Creates a new instance.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ========== 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"> </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><a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannel.html" title="interface in org.jboss.netty.channel.socket">DatagramChannel</a></code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">newChannel</a></strong>(<a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel">ChannelPipeline</a> pipeline)</code>
- <div class="block">Creates and opens a new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a> and attaches the specified
- <a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel"><code>ChannelPipeline</code></a> to the new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a>.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()">releaseExternalResources</a></strong>()</code>
- <div class="block">Releases the external resources that this factory depends on to function.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
- <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor_detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="NioDatagramChannelFactory()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory()</pre>
- <div class="block">Create a new <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> with a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html?is-external=true#newCachedThreadPool()" title="class or interface in java.util.concurrent"><code>Executors.newCachedThreadPool()</code></a>
- and without preferred <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a>. Please note that the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a>
- of the channel will be platform (and possibly configuration) dependent and therefore
- unspecified. Use <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(org.jboss.netty.channel.socket.InternetProtocolFamily)"><code>NioDatagramChannelFactory(InternetProtocolFamily)</code></a> if unsure.
- See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.InternetProtocolFamily)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</pre>
- <div class="block">Create a new <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramChannelFactory</code></a> with a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html?is-external=true#newCachedThreadPool()" title="class or interface in java.util.concurrent"><code>Executors.newCachedThreadPool()</code></a>.
- See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(java.util.concurrent.Executor)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor)</pre>
- <div class="block">Creates a new instance. Calling this constructor is same with calling
- <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, int)"><code>NioDatagramChannelFactory(Executor, int)</code></a> with 2 * the number of
- available processors in the machine. The number of available processors
- is obtained by <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html?is-external=true#availableProcessors()" title="class or interface in java.lang"><code>Runtime.availableProcessors()</code></a>.
- <p>
- Please note that the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> of the channel will be platform (and possibly
- configuration) dependent and therefore unspecified.
- Use <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, org.jboss.netty.channel.socket.InternetProtocolFamily)"><code>NioDatagramChannelFactory(Executor, InternetProtocolFamily)</code></a> if unsure.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerExecutor</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> which will execute the I/O worker threads</dd></dl>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- int workerCount)</pre>
- <div class="block">Creates a new instance.
- <p>
- Please note that the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> of the channel will be platform (and possibly
- configuration) dependent and therefore unspecified.
- Use <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, int, org.jboss.netty.channel.socket.InternetProtocolFamily)"><code>NioDatagramChannelFactory(Executor, int, InternetProtocolFamily)</code></a> if unsure.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerExecutor</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> which will execute the I/O worker threads</dd><dd><code>workerCount</code> - the maximum number of I/O worker threads</dd></dl>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a><<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>> workerPool)</pre>
- <div class="block">Creates a new instance.
- <p>
- Please note that the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> of the channel will be platform (and possibly
- configuration) dependent and therefore unspecified.
- Use <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool, org.jboss.netty.channel.socket.InternetProtocolFamily)"><code>NioDatagramChannelFactory(WorkerPool, InternetProtocolFamily)</code></a> if unsure.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerPool</code> - the <a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio"><code>WorkerPool</code></a> which will be used to obtain the <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio"><code>NioDatagramWorker</code></a> that execute
- the I/O worker threads</dd></dl>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, org.jboss.netty.channel.socket.InternetProtocolFamily)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</pre>
- <div class="block">Creates a new instance. Calling this constructor is same with calling
- <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor, int)"><code>NioDatagramChannelFactory(Executor, int)</code></a> with 2 * the number of
- available processors in the machine. The number of available processors
- is obtained by <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html?is-external=true#availableProcessors()" title="class or interface in java.lang"><code>Runtime.availableProcessors()</code></a>.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerExecutor</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> which will execute the I/O worker threads</dd><dd><code>family</code> - the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> to use. This should be used for UDP multicast.
- <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int, org.jboss.netty.channel.socket.InternetProtocolFamily)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> workerExecutor,
- int workerCount,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</pre>
- <div class="block">Creates a new instance.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerExecutor</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> which will execute the I/O worker threads</dd><dd><code>workerCount</code> - the maximum number of I/O worker threads</dd><dd><code>family</code> - the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> to use. This should be used for UDP multicast.
- <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
- </li>
- </ul>
- <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool, org.jboss.netty.channel.socket.InternetProtocolFamily)">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>NioDatagramChannelFactory</h4>
- <pre>public NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a><<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>> workerPool,
- <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a> family)</pre>
- <div class="block">Creates a new instance.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>workerPool</code> - the <a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio"><code>WorkerPool</code></a> which will be used to obtain the <a href="../../../../../../org/jboss/netty/channel/socket/Worker.html" title="interface in org.jboss.netty.channel.socket"><code>Worker</code></a> that execute
- the I/O worker threads</dd><dd><code>family</code> - the <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket"><code>InternetProtocolFamily</code></a> to use. This should be used for UDP multicast.
- <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method_detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="newChannel(org.jboss.netty.channel.ChannelPipeline)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>newChannel</h4>
- <pre>public <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannel.html" title="interface in org.jboss.netty.channel.socket">DatagramChannel</a> newChannel(<a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel">ChannelPipeline</a> pipeline)</pre>
- <div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">ChannelFactory</a></code></strong></div>
- <div class="block">Creates and opens a new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a> and attaches the specified
- <a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel"><code>ChannelPipeline</code></a> to the new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a>.</div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">newChannel</a></code> in interface <code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html" title="interface in org.jboss.netty.channel">ChannelFactory</a></code></dd>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">newChannel</a></code> in interface <code><a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket">DatagramChannelFactory</a></code></dd>
- <dt><span class="strong">Parameters:</span></dt><dd><code>pipeline</code> - the <a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel"><code>ChannelPipeline</code></a> which is going to be
- attached to the new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a></dd>
- <dt><span class="strong">Returns:</span></dt><dd>the newly open channel</dd></dl>
- </li>
- </ul>
- <a name="releaseExternalResources()">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>releaseExternalResources</h4>
- <pre>public void releaseExternalResources()</pre>
- <div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#releaseExternalResources()">ChannelFactory</a></code></strong></div>
- <div class="block">Releases the external resources that this factory depends on to function.
- An external resource is a resource that this factory didn't create by
- itself. For example, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a>s that you specified in the factory
- constructor are external resources. You can call this method to release
- all external resources conveniently when the resources are not used by
- this factory or any other part of your application. An unexpected
- behavior will be resulted in if the resources are released when there's
- an open channel which is managed by this factory.</div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#releaseExternalResources()">releaseExternalResources</a></code> in interface <code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html" title="interface in org.jboss.netty.channel">ChannelFactory</a></code></dd>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/jboss/netty/util/ExternalResourceReleasable.html#releaseExternalResources()">releaseExternalResources</a></code> in interface <code><a href="../../../../../../org/jboss/netty/util/ExternalResourceReleasable.html" title="interface in org.jboss.netty.util">ExternalResourceReleasable</a></code></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/NioDatagramChannelFactory.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/jboss/netty/channel/socket/nio/NioDatagramChannelConfig.html" title="interface in org.jboss.netty.channel.socket.nio"><span class="strong">Prev Class</span></a></li>
- <li><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio"><span class="strong">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../../../index.html?org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" target="_top">Frames</a></li>
- <li><a href="NioDatagramChannelFactory.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: </li>
- <li>Nested | </li>
- <li>Field | </li>
- <li><a href="#constructor_summary">Constr</a> | </li>
- <li><a href="#method_summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor_detail">Constr</a> | </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 © 2008-2012 <a href="http://netty.io/">The Netty Project</a>. All Rights Reserved.</small></p>
- </body>
- </html>