PageRenderTime 51ms CodeModel.GetById 24ms RepoModel.GetById 0ms 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>
  108. 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>
  109. implements <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. <h3>How threads work</h3>
  115. <p>
  116. 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>;
  117. worker threads.
  118. <h4>Worker threads</h4>
  119. <p>
  120. 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
  121. threads. A worker thread performs non-blocking read and write for one or
  122. 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.
  123. <h3>Life cycle of threads and graceful shutdown</h3>
  124. <p>
  125. 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
  126. 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
  127. 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
  128. number of threads. It is the best bet to specify
  129. <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>.
  130. <p>
  131. All worker threads are acquired lazily, and then released when there's
  132. 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>
  133. are also released when the worker threads are released. Therefore, to shut
  134. down a service gracefully, you should do the following:
  135. <ol>
  136. <li>close all channels created by the factory usually using
  137. <a href="../../../../../../org/jboss/netty/channel/group/ChannelGroup.html#close()"><code>ChannelGroup.close()</code></a>, and</li>
  138. <li>call <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()"><code>releaseExternalResources()</code></a>.</li>
  139. </ol>
  140. Please make sure not to shut down the executor until all channels are
  141. 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>
  142. and the related resources might not be released properly.
  143. <h3>Limitation</h3>
  144. <p>
  145. 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>
  146. instead.</div>
  147. </li>
  148. </ul>
  149. </div>
  150. <div class="summary">
  151. <ul class="blockList">
  152. <li class="blockList">
  153. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  154. <ul class="blockList">
  155. <li class="blockList"><a name="constructor_summary">
  156. <!-- -->
  157. </a>
  158. <h3>Constructor Summary</h3>
  159. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  160. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  161. <tr>
  162. <th class="colOne" scope="col">Constructor and Description</th>
  163. </tr>
  164. <tr class="altColor">
  165. <td class="colOne"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory()">NioDatagramChannelFactory</a></strong>()</code>
  166. <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>
  167. 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>
  168. </td>
  169. </tr>
  170. <tr class="rowColor">
  171. <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>
  172. <div class="block">Creates a new instance.</div>
  173. </td>
  174. </tr>
  175. <tr class="altColor">
  176. <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,
  177. int&nbsp;workerCount)</code>
  178. <div class="block">Creates a new instance.</div>
  179. </td>
  180. </tr>
  181. <tr class="rowColor">
  182. <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,
  183. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
  184. <div class="block">Creates a new instance.</div>
  185. </td>
  186. </tr>
  187. <tr class="altColor">
  188. <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,
  189. int&nbsp;workerCount,
  190. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
  191. <div class="block">Creates a new instance.</div>
  192. </td>
  193. </tr>
  194. <tr class="rowColor">
  195. <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>
  196. <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>
  197. </td>
  198. </tr>
  199. <tr class="altColor">
  200. <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>
  201. <div class="block">Creates a new instance.</div>
  202. </td>
  203. </tr>
  204. <tr class="rowColor">
  205. <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,
  206. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</code>
  207. <div class="block">Creates a new instance.</div>
  208. </td>
  209. </tr>
  210. </table>
  211. </li>
  212. </ul>
  213. <!-- ========== METHOD SUMMARY =========== -->
  214. <ul class="blockList">
  215. <li class="blockList"><a name="method_summary">
  216. <!-- -->
  217. </a>
  218. <h3>Method Summary</h3>
  219. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  220. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  221. <tr>
  222. <th class="colFirst" scope="col">Modifier and Type</th>
  223. <th class="colLast" scope="col">Method and Description</th>
  224. </tr>
  225. <tr class="altColor">
  226. <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>
  227. <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>
  228. <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
  229. <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>
  230. </td>
  231. </tr>
  232. <tr class="rowColor">
  233. <td class="colFirst"><code>void</code></td>
  234. <td class="colLast"><code><strong><a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#releaseExternalResources()">releaseExternalResources</a></strong>()</code>
  235. <div class="block">Releases the external resources that this factory depends on to function.</div>
  236. </td>
  237. </tr>
  238. </table>
  239. <ul class="blockList">
  240. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  241. <!-- -->
  242. </a>
  243. <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>
  244. <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>
  245. </ul>
  246. </li>
  247. </ul>
  248. </li>
  249. </ul>
  250. </div>
  251. <div class="details">
  252. <ul class="blockList">
  253. <li class="blockList">
  254. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  255. <ul class="blockList">
  256. <li class="blockList"><a name="constructor_detail">
  257. <!-- -->
  258. </a>
  259. <h3>Constructor Detail</h3>
  260. <a name="NioDatagramChannelFactory()">
  261. <!-- -->
  262. </a>
  263. <ul class="blockList">
  264. <li class="blockList">
  265. <h4>NioDatagramChannelFactory</h4>
  266. <pre>public&nbsp;NioDatagramChannelFactory()</pre>
  267. <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>
  268. 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>
  269. of the channel will be platform (and possibly configuration) dependent and therefore
  270. 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.
  271. See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
  272. </li>
  273. </ul>
  274. <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.InternetProtocolFamily)">
  275. <!-- -->
  276. </a>
  277. <ul class="blockList">
  278. <li class="blockList">
  279. <h4>NioDatagramChannelFactory</h4>
  280. <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>
  281. <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>.
  282. See <a href="../../../../../../org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html#NioDatagramChannelFactory(java.util.concurrent.Executor)"><code>NioDatagramChannelFactory(Executor)</code></a></div>
  283. </li>
  284. </ul>
  285. <a name="NioDatagramChannelFactory(java.util.concurrent.Executor)">
  286. <!-- -->
  287. </a>
  288. <ul class="blockList">
  289. <li class="blockList">
  290. <h4>NioDatagramChannelFactory</h4>
  291. <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>
  292. <div class="block">Creates a new instance. Calling this constructor is same with calling
  293. <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
  294. available processors in the machine. The number of available processors
  295. 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>.
  296. <p>
  297. 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
  298. configuration) dependent and therefore unspecified.
  299. 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>
  300. <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>
  301. </li>
  302. </ul>
  303. <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int)">
  304. <!-- -->
  305. </a>
  306. <ul class="blockList">
  307. <li class="blockList">
  308. <h4>NioDatagramChannelFactory</h4>
  309. <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,
  310. int&nbsp;workerCount)</pre>
  311. <div class="block">Creates a new instance.
  312. <p>
  313. 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
  314. configuration) dependent and therefore unspecified.
  315. 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>
  316. <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>
  317. </li>
  318. </ul>
  319. <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool)">
  320. <!-- -->
  321. </a>
  322. <ul class="blockList">
  323. <li class="blockList">
  324. <h4>NioDatagramChannelFactory</h4>
  325. <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>
  326. <div class="block">Creates a new instance.
  327. <p>
  328. 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
  329. configuration) dependent and therefore unspecified.
  330. 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>
  331. <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
  332. the I/O worker threads</dd></dl>
  333. </li>
  334. </ul>
  335. <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, org.jboss.netty.channel.socket.InternetProtocolFamily)">
  336. <!-- -->
  337. </a>
  338. <ul class="blockList">
  339. <li class="blockList">
  340. <h4>NioDatagramChannelFactory</h4>
  341. <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,
  342. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
  343. <div class="block">Creates a new instance. Calling this constructor is same with calling
  344. <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
  345. available processors in the machine. The number of available processors
  346. 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>
  347. <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.
  348. <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
  349. </li>
  350. </ul>
  351. <a name="NioDatagramChannelFactory(java.util.concurrent.Executor, int, org.jboss.netty.channel.socket.InternetProtocolFamily)">
  352. <!-- -->
  353. </a>
  354. <ul class="blockList">
  355. <li class="blockList">
  356. <h4>NioDatagramChannelFactory</h4>
  357. <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,
  358. int&nbsp;workerCount,
  359. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
  360. <div class="block">Creates a new instance.</div>
  361. <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.
  362. <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
  363. </li>
  364. </ul>
  365. <a name="NioDatagramChannelFactory(org.jboss.netty.channel.socket.nio.WorkerPool, org.jboss.netty.channel.socket.InternetProtocolFamily)">
  366. <!-- -->
  367. </a>
  368. <ul class="blockListLast">
  369. <li class="blockList">
  370. <h4>NioDatagramChannelFactory</h4>
  371. <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,
  372. <a href="../../../../../../org/jboss/netty/channel/socket/InternetProtocolFamily.html" title="enum in org.jboss.netty.channel.socket">InternetProtocolFamily</a>&nbsp;family)</pre>
  373. <div class="block">Creates a new instance.</div>
  374. <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
  375. 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.
  376. <strong>Be aware that this option is only considered when running on java7+</strong></dd></dl>
  377. </li>
  378. </ul>
  379. </li>
  380. </ul>
  381. <!-- ============ METHOD DETAIL ========== -->
  382. <ul class="blockList">
  383. <li class="blockList"><a name="method_detail">
  384. <!-- -->
  385. </a>
  386. <h3>Method Detail</h3>
  387. <a name="newChannel(org.jboss.netty.channel.ChannelPipeline)">
  388. <!-- -->
  389. </a>
  390. <ul class="blockList">
  391. <li class="blockList">
  392. <h4>newChannel</h4>
  393. <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>
  394. <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>
  395. <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
  396. <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>
  397. <dl>
  398. <dt><strong>Specified by:</strong></dt>
  399. <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>
  400. <dt><strong>Specified by:</strong></dt>
  401. <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>
  402. <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
  403. attached to the new <a href="../../../../../../org/jboss/netty/channel/Channel.html" title="interface in org.jboss.netty.channel"><code>Channel</code></a></dd>
  404. <dt><span class="strong">Returns:</span></dt><dd>the newly open channel</dd></dl>
  405. </li>
  406. </ul>
  407. <a name="releaseExternalResources()">
  408. <!-- -->
  409. </a>
  410. <ul class="blockListLast">
  411. <li class="blockList">
  412. <h4>releaseExternalResources</h4>
  413. <pre>public&nbsp;void&nbsp;releaseExternalResources()</pre>
  414. <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../org/jboss/netty/channel/ChannelFactory.html#releaseExternalResources()">ChannelFactory</a></code></strong></div>
  415. <div class="block">Releases the external resources that this factory depends on to function.
  416. An external resource is a resource that this factory didn't create by
  417. 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
  418. constructor are external resources. You can call this method to release
  419. all external resources conveniently when the resources are not used by
  420. this factory or any other part of your application. An unexpected
  421. behavior will be resulted in if the resources are released when there's
  422. an open channel which is managed by this factory.</div>
  423. <dl>
  424. <dt><strong>Specified by:</strong></dt>
  425. <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>
  426. <dt><strong>Specified by:</strong></dt>
  427. <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>
  428. </dl>
  429. </li>
  430. </ul>
  431. </li>
  432. </ul>
  433. </li>
  434. </ul>
  435. </div>
  436. </div>
  437. <!-- ========= END OF CLASS DATA ========= -->
  438. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  439. <div class="bottomNav"><a name="navbar_bottom">
  440. <!-- -->
  441. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  442. <!-- -->
  443. </a>
  444. <ul class="navList" title="Navigation">
  445. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  446. <li><a href="package-summary.html">Package</a></li>
  447. <li class="navBarCell1Rev">Class</li>
  448. <li><a href="class-use/NioDatagramChannelFactory.html">Use</a></li>
  449. <li><a href="package-tree.html">Tree</a></li>
  450. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  451. <li><a href="../../../../../../index-all.html">Index</a></li>
  452. <li><a href="../../../../../../help-doc.html">Help</a></li>
  453. </ul>
  454. </div>
  455. <div class="subNav">
  456. <ul class="navList">
  457. <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>
  458. <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>
  459. </ul>
  460. <ul class="navList">
  461. <li><a href="../../../../../../index.html?org/jboss/netty/channel/socket/nio/NioDatagramChannelFactory.html" target="_top">Frames</a></li>
  462. <li><a href="NioDatagramChannelFactory.html" target="_top">No Frames</a></li>
  463. </ul>
  464. <ul class="navList" id="allclasses_navbar_bottom">
  465. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  466. </ul>
  467. <div>
  468. <script type="text/javascript"><!--
  469. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  470. if(window==top) {
  471. allClassesLink.style.display = "block";
  472. }
  473. else {
  474. allClassesLink.style.display = "none";
  475. }
  476. //-->
  477. </script>
  478. </div>
  479. <div>
  480. <ul class="subNavList">
  481. <li>Summary:&nbsp;</li>
  482. <li>Nested&nbsp;|&nbsp;</li>
  483. <li>Field&nbsp;|&nbsp;</li>
  484. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  485. <li><a href="#method_summary">Method</a></li>
  486. </ul>
  487. <ul class="subNavList">
  488. <li>Detail:&nbsp;</li>
  489. <li>Field&nbsp;|&nbsp;</li>
  490. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  491. <li><a href="#method_detail">Method</a></li>
  492. </ul>
  493. </div>
  494. <a name="skip-navbar_bottom">
  495. <!-- -->
  496. </a></div>
  497. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  498. <p class="legalCopy"><small>Copyright &#169; 2008-2012 <a href="http://netty.io/">The Netty Project</a>. All Rights Reserved.</small></p>
  499. </body>
  500. </html>