There is only one thread type in a {@link NioDatagramChannelFactory}; worker threads.
One {@link NioDatagramChannelFactory} can have one or more workerthreads. A worker thread performs non-blocking read and write for one or more {@link DatagramChannel}s in a non-blocking mode.
All worker threads are acquired from the {@link Executor} which was specifiedwhen a {@link NioDatagramChannelFactory} was created. Therefore, you shouldmake sure the specified {@link Executor} is able to lend the sufficientnumber of threads. It is the best bet to specify {@linkplain Executors#newCachedThreadPool() a cached thread pool}.
All worker threads are acquired lazily, and then released when there's nothing left to process. All the related resources such as {@link Selector}are also released when the worker threads are released. Therefore, to shut down a service gracefully, you should do the following:
Multicast is not supported. Please use {@link OioDatagramChannelFactory}instead. @apiviz.landmark
|
|
|
|