PageRenderTime 53ms CodeModel.GetById 2ms app.highlight 43ms RepoModel.GetById 1ms app.codeStats 0ms

/server/Uconnocalypse/lib/netty-3.5.8.Final-api/org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html

https://bitbucket.org/EthanLevine/senior-design
HTML | 508 lines | 447 code | 8 blank | 53 comment | 0 complexity | ff8975f73ca5229b14b5c842257a1e61 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!-- NewPage -->
  3<html lang="en">
  4<head>
  5<!-- Generated by javadoc (version 1.7.0_04-ea) on Sat Sep 29 09:36:55 CEST 2012 -->
  6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
  7<title>NioDatagramChannelFactory (The Netty Project API Reference (3.5.8.Final))</title>
  8<meta name="date" content="2012-09-29">
  9<meta name="keywords" content="org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory class">
 10<meta name="keywords" content="newChannel()">
 11<meta name="keywords" content="releaseExternalResources()">
 12<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
 13</head>
 14<body>
 15<script type="text/javascript"><!--
 16    if (location.href.indexOf('is-external=true') == -1) {
 17        parent.document.title="NioDatagramChannelFactory (The Netty Project API Reference (3.5.8.Final))";
 18    }
 19//-->
 20</script>
 21<noscript>
 22<div>JavaScript is disabled on your browser.</div>
 23</noscript>
 24<!-- ========= START OF TOP NAVBAR ======= -->
 25<div class="topNav"><a name="navbar_top">
 26<!--   -->
 27</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
 28<!--   -->
 29</a>
 30<ul class="navList" title="Navigation">
 31<li><a href="../../../../../../overview-summary.html">Overview</a></li>
 32<li><a href="package-summary.html">Package</a></li>
 33<li class="navBarCell1Rev">Class</li>
 34<li><a href="class-use/NioDatagramChannelFactory.html">Use</a></li>
 35<li><a href="package-tree.html">Tree</a></li>
 36<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
 37<li><a href="../../../../../../index-all.html">Index</a></li>
 38<li><a href="../../../../../../help-doc.html">Help</a></li>
 39</ul>
 40</div>
 41<div class="subNav">
 42<ul class="navList">
 43<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>
 44<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>
 45</ul>
 46<ul class="navList">
 47<li><a href="../../../../../../index.html?org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" target="_top">Frames</a></li>
 48<li><a href="NioDatagramChannelFactory.html" target="_top">No Frames</a></li>
 49</ul>
 50<ul class="navList" id="allclasses_navbar_top">
 51<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
 52</ul>
 53<div>
 54<script type="text/javascript"><!--
 55  allClassesLink = document.getElementById("allclasses_navbar_top");
 56  if(window==top) {
 57    allClassesLink.style.display = "block";
 58  }
 59  else {
 60    allClassesLink.style.display = "none";
 61  }
 62  //-->
 63</script>
 64</div>
 65<div>
 66<ul class="subNavList">
 67<li>Summary:&nbsp;</li>
 68<li>Nested&nbsp;|&nbsp;</li>
 69<li>Field&nbsp;|&nbsp;</li>
 70<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
 71<li><a href="#method_summary">Method</a></li>
 72</ul>
 73<ul class="subNavList">
 74<li>Detail:&nbsp;</li>
 75<li>Field&nbsp;|&nbsp;</li>
 76<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
 77<li><a href="#method_detail">Method</a></li>
 78</ul>
 79</div>
 80<a name="skip-navbar_top">
 81<!--   -->
 82</a></div>
 83<!-- ========= END OF TOP NAVBAR ========= -->
 84<!-- ======== START OF CLASS DATA ======== -->
 85<div class="header">
 86<div class="subTitle">org.jboss.netty.channel.socket.nio</div>
 87<h2 title="Class NioDatagramChannelFactory" class="title">Class NioDatagramChannelFactory</h2>
 88</div>
 89<div class="contentContainer">
 90<ul class="inheritance">
 91<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>
 92<li>
 93<ul class="inheritance">
 94<li>org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory</li>
 95</ul>
 96</li>
 97</ul>
 98<div class="description">
 99<ul class="blockList">
100<li class="blockList">
101<dl>
102<dt>All Implemented Interfaces:</dt>
103<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>
104</dl>
105<hr>
106<br>
107<pre>public class <span class="strong">NioDatagramChannelFactory</span>
108extends <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>
109implements <a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket">DatagramChannelFactory</a></pre>
110<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
111 <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
112 was introduced with NIO to serve many number of concurrent connections
113 efficiently.
114
115 <h3>How threads work</h3>
116 <p>
117 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>;
118 worker threads.
119
120 <h4>Worker threads</h4>
121 <p>
122 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
123 threads.  A worker thread performs non-blocking read and write for one or
124 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.
125
126 <h3>Life cycle of threads and graceful shutdown</h3>
127 <p>
128 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
129 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
130 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
131 number of threads.  It is the best bet to specify
132 <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>.
133 <p>
134 All worker threads are acquired lazily, and then released when there's
135 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>
136 are also released when the worker threads are released.  Therefore, to shut
137 down a service gracefully, you should do the following:
138
139 <ol>
140 <li>close all channels created by the factory usually using
141     <a href="../../../../../../org/jboss/netty/channel/group/ChannelGroup.html#close()"><code>ChannelGroup.close()</code></a>, and</li>
142 <li>call <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()"><code>releaseExternalResources()</code></a>.</li>
143 </ol>
144
145 Please make sure not to shut down the executor until all channels are
146 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>
147 and the related resources might not be released properly.
148
149 <h3>Limitation</h3>
150 <p>
151 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>
152 instead.</div>
153</li>
154</ul>
155</div>
156<div class="summary">
157<ul class="blockList">
158<li class="blockList">
159<!-- ======== CONSTRUCTOR SUMMARY ======== -->
160<ul class="blockList">
161<li class="blockList"><a name="constructor_summary">
162<!--   -->
163</a>
164<h3>Constructor Summary</h3>
165<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
166<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
167<tr>
168<th class="colOne" scope="col">Constructor and Description</th>
169</tr>
170<tr class="altColor">
171<td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory()">NioDatagramChannelFactory</a></strong>()</code>
172<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>
173 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>
174</td>
175</tr>
176<tr class="rowColor">
177<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>&nbsp;workerExecutor)</code>
178<div class="block">Creates a new instance.</div>
179</td>
180</tr>
181<tr class="altColor">
182<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>&nbsp;workerExecutor,
183                         int&nbsp;workerCount)</code>
184<div class="block">Creates a new instance.</div>
185</td>
186</tr>
187<tr class="rowColor">
188<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>&nbsp;workerExecutor,
189                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
190<div class="block">Creates a new instance.</div>
191</td>
192</tr>
193<tr class="altColor">
194<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>&nbsp;workerExecutor,
195                         int&nbsp;workerCount,
196                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
197<div class="block">Creates a new instance.</div>
198</td>
199</tr>
200<tr class="rowColor">
201<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>&nbsp;family)</code>
202<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>
203</td>
204</tr>
205<tr class="altColor">
206<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>&lt;<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>&gt;&nbsp;workerPool)</code>
207<div class="block">Creates a new instance.</div>
208</td>
209</tr>
210<tr class="rowColor">
211<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>&lt;<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>&gt;&nbsp;workerPool,
212                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
213<div class="block">Creates a new instance.</div>
214</td>
215</tr>
216</table>
217</li>
218</ul>
219<!-- ========== METHOD SUMMARY =========== -->
220<ul class="blockList">
221<li class="blockList"><a name="method_summary">
222<!--   -->
223</a>
224<h3>Method Summary</h3>
225<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
226<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
227<tr>
228<th class="colFirst" scope="col">Modifier and Type</th>
229<th class="colLast" scope="col">Method and Description</th>
230</tr>
231<tr class="altColor">
232<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>
233<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>&nbsp;pipeline)</code>
234<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
235 <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>
236</td>
237</tr>
238<tr class="rowColor">
239<td class="colFirst"><code>void</code></td>
240<td class="colLast"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()">releaseExternalResources</a></strong>()</code>
241<div class="block">Releases the external resources that this factory depends on to function.</div>
242</td>
243</tr>
244</table>
245<ul class="blockList">
246<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
247<!--   -->
248</a>
249<h3>Methods inherited from class&nbsp;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>
250<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>
251</ul>
252</li>
253</ul>
254</li>
255</ul>
256</div>
257<div class="details">
258<ul class="blockList">
259<li class="blockList">
260<!-- ========= CONSTRUCTOR DETAIL ======== -->
261<ul class="blockList">
262<li class="blockList"><a name="constructor_detail">
263<!--   -->
264</a>
265<h3>Constructor Detail</h3>
266<a name="NioDatagramChannelFactory()">
267<!--   -->
268</a>
269<ul class="blockList">
270<li class="blockList">
271<h4>NioDatagramChannelFactory</h4>
272<pre>public&nbsp;NioDatagramChannelFactory()</pre>
273<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>
274 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>
275 of the channel will be platform (and possibly configuration) dependent and therefore
276 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.
277
278 See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
279</li>
280</ul>
281<a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.InternetProtocolFamily)">
282<!--   -->
283</a>
284<ul class="blockList">
285<li class="blockList">
286<h4>NioDatagramChannelFactory</h4>
287<pre>public&nbsp;NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
288<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>.
289
290 See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
291</li>
292</ul>
293<a name="NioDatagramChannelFactory(java.util.concurrent.Executor)">
294<!--   -->
295</a>
296<ul class="blockList">
297<li class="blockList">
298<h4>NioDatagramChannelFactory</h4>
299<pre>public&nbsp;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>&nbsp;workerExecutor)</pre>
300<div class="block">Creates a new instance.  Calling this constructor is same with calling
301 <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
302 available processors in the machine.  The number of available processors
303 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>.
304 <p>
305 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
306 configuration) dependent and therefore unspecified.
307 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>
308<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>
309</li>
310</ul>
311<a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int)">
312<!--   -->
313</a>
314<ul class="blockList">
315<li class="blockList">
316<h4>NioDatagramChannelFactory</h4>
317<pre>public&nbsp;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>&nbsp;workerExecutor,
318                         int&nbsp;workerCount)</pre>
319<div class="block">Creates a new instance.
320 <p>
321 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
322 configuration) dependent and therefore unspecified.
323 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>
324<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>
325</li>
326</ul>
327<a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool)">
328<!--   -->
329</a>
330<ul class="blockList">
331<li class="blockList">
332<h4>NioDatagramChannelFactory</h4>
333<pre>public&nbsp;NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a>&lt;<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>&gt;&nbsp;workerPool)</pre>
334<div class="block">Creates a new instance.
335 <p>
336 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
337 configuration) dependent and therefore unspecified.
338 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>
339<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
340 the I/O worker threads</dd></dl>
341</li>
342</ul>
343<a name="NioDatagramChannelFactory(java.util.concurrent.Executor, org.jboss.netty.channel.socket.InternetProtocolFamily)">
344<!--   -->
345</a>
346<ul class="blockList">
347<li class="blockList">
348<h4>NioDatagramChannelFactory</h4>
349<pre>public&nbsp;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>&nbsp;workerExecutor,
350                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
351<div class="block">Creates a new instance.  Calling this constructor is same with calling
352 <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
353 available processors in the machine.  The number of available processors
354 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>
355<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.
356        <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
357</li>
358</ul>
359<a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int, org.jboss.netty.channel.socket.InternetProtocolFamily)">
360<!--   -->
361</a>
362<ul class="blockList">
363<li class="blockList">
364<h4>NioDatagramChannelFactory</h4>
365<pre>public&nbsp;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>&nbsp;workerExecutor,
366                         int&nbsp;workerCount,
367                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
368<div class="block">Creates a new instance.</div>
369<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.
370        <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
371</li>
372</ul>
373<a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool, org.jboss.netty.channel.socket.InternetProtocolFamily)">
374<!--   -->
375</a>
376<ul class="blockListLast">
377<li class="blockList">
378<h4>NioDatagramChannelFactory</h4>
379<pre>public&nbsp;NioDatagramChannelFactory(<a href="../../../../../../org/jboss/netty/channel/socket/nio/WorkerPool.html" title="interface in org.jboss.netty.channel.socket.nio">WorkerPool</a>&lt;<a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramWorker.html" title="class in org.jboss.netty.channel.socket.nio">NioDatagramWorker</a>&gt;&nbsp;workerPool,
380                         <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
381<div class="block">Creates a new instance.</div>
382<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
383        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.
384        <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
385</li>
386</ul>
387</li>
388</ul>
389<!-- ============ METHOD DETAIL ========== -->
390<ul class="blockList">
391<li class="blockList"><a name="method_detail">
392<!--   -->
393</a>
394<h3>Method Detail</h3>
395<a name="newChannel(org.jboss.netty.channel.ChannelPipeline)">
396<!--   -->
397</a>
398<ul class="blockList">
399<li class="blockList">
400<h4>newChannel</h4>
401<pre>public&nbsp;<a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannel.html" title="interface in org.jboss.netty.channel.socket">DatagramChannel</a>&nbsp;newChannel(<a href="../../../../../../org/jboss/netty/channel/ChannelPipeline.html" title="interface in org.jboss.netty.channel">ChannelPipeline</a>&nbsp;pipeline)</pre>
402<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">ChannelFactory</a></code></strong></div>
403<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
404 <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>
405<dl>
406<dt><strong>Specified by:</strong></dt>
407<dd><code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">newChannel</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html" title="interface in org.jboss.netty.channel">ChannelFactory</a></code></dd>
408<dt><strong>Specified by:</strong></dt>
409<dd><code><a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html#newChannel(org.jboss.netty.channel.ChannelPipeline)">newChannel</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/socket/DatagramChannelFactory.html" title="interface in org.jboss.netty.channel.socket">DatagramChannelFactory</a></code></dd>
410<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
411                 attached to the new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a></dd>
412<dt><span class="strong">Returns:</span></dt><dd>the newly open channel</dd></dl>
413</li>
414</ul>
415<a name="releaseExternalResources()">
416<!--   -->
417</a>
418<ul class="blockListLast">
419<li class="blockList">
420<h4>releaseExternalResources</h4>
421<pre>public&nbsp;void&nbsp;releaseExternalResources()</pre>
422<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#releaseExternalResources()">ChannelFactory</a></code></strong></div>
423<div class="block">Releases the external resources that this factory depends on to function.
424 An external resource is a resource that this factory didn't create by
425 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
426 constructor are external resources.  You can call this method to release
427 all external resources conveniently when the resources are not used by
428 this factory or any other part of your application.  An unexpected
429 behavior will be resulted in if the resources are released when there's
430 an open channel which is managed by this factory.</div>
431<dl>
432<dt><strong>Specified by:</strong></dt>
433<dd><code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#releaseExternalResources()">releaseExternalResources</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html" title="interface in org.jboss.netty.channel">ChannelFactory</a></code></dd>
434<dt><strong>Specified by:</strong></dt>
435<dd><code><a href="../../../../../../org/jboss/netty/util/ExternalResourceReleasable.html#releaseExternalResources()">releaseExternalResources</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/jboss/netty/util/ExternalResourceReleasable.html" title="interface in org.jboss.netty.util">ExternalResourceReleasable</a></code></dd>
436</dl>
437</li>
438</ul>
439</li>
440</ul>
441</li>
442</ul>
443</div>
444</div>
445<!-- ========= END OF CLASS DATA ========= -->
446<!-- ======= START OF BOTTOM NAVBAR ====== -->
447<div class="bottomNav"><a name="navbar_bottom">
448<!--   -->
449</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
450<!--   -->
451</a>
452<ul class="navList" title="Navigation">
453<li><a href="../../../../../../overview-summary.html">Overview</a></li>
454<li><a href="package-summary.html">Package</a></li>
455<li class="navBarCell1Rev">Class</li>
456<li><a href="class-use/NioDatagramChannelFactory.html">Use</a></li>
457<li><a href="package-tree.html">Tree</a></li>
458<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
459<li><a href="../../../../../../index-all.html">Index</a></li>
460<li><a href="../../../../../../help-doc.html">Help</a></li>
461</ul>
462</div>
463<div class="subNav">
464<ul class="navList">
465<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>
466<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>
467</ul>
468<ul class="navList">
469<li><a href="../../../../../../index.html?org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" target="_top">Frames</a></li>
470<li><a href="NioDatagramChannelFactory.html" target="_top">No Frames</a></li>
471</ul>
472<ul class="navList" id="allclasses_navbar_bottom">
473<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
474</ul>
475<div>
476<script type="text/javascript"><!--
477  allClassesLink = document.getElementById("allclasses_navbar_bottom");
478  if(window==top) {
479    allClassesLink.style.display = "block";
480  }
481  else {
482    allClassesLink.style.display = "none";
483  }
484  //-->
485</script>
486</div>
487<div>
488<ul class="subNavList">
489<li>Summary:&nbsp;</li>
490<li>Nested&nbsp;|&nbsp;</li>
491<li>Field&nbsp;|&nbsp;</li>
492<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
493<li><a href="#method_summary">Method</a></li>
494</ul>
495<ul class="subNavList">
496<li>Detail:&nbsp;</li>
497<li>Field&nbsp;|&nbsp;</li>
498<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
499<li><a href="#method_detail">Method</a></li>
500</ul>
501</div>
502<a name="skip-navbar_bottom">
503<!--   -->
504</a></div>
505<!-- ======== END OF BOTTOM NAVBAR ======= -->
506<p class="legalCopy"><small>Copyright &#169; 2008-2012 <a href="http://netty.io/">The Netty Project</a>. All Rights Reserved.</small></p>
507</body>
508</html>