class NioDatagramPipelineSink extends AbstractNioChannelSink
ChannelPipeline. It contains
an array of I/O workers.| Modifier and Type | Field and Description |
|---|---|
private WorkerPool<NioDatagramWorker> |
workerPool |
| Constructor and Description |
|---|
NioDatagramPipelineSink(WorkerPool<NioDatagramWorker> workerPool)
Creates a new
NioDatagramPipelineSink with a the number of NioDatagramWorkers
specified in workerCount. |
| Modifier and Type | Method and Description |
|---|---|
private static void |
bind(NioDatagramChannel channel,
ChannelFuture future,
java.net.InetSocketAddress address)
Will bind the DatagramSocket to the passed-in address.
|
private static void |
close(NioDatagramChannel channel,
ChannelFuture future) |
private static void |
connect(NioDatagramChannel channel,
ChannelFuture future,
java.net.InetSocketAddress remoteAddress) |
void |
eventSunk(ChannelPipeline pipeline,
ChannelEvent e)
Handle downstream event.
|
(package private) NioDatagramWorker |
nextWorker() |
execute, isFireExceptionCaughtLaterexceptionCaughtprivate final WorkerPool<NioDatagramWorker> workerPool
NioDatagramPipelineSink(WorkerPool<NioDatagramWorker> workerPool)
NioDatagramPipelineSink with a the number of NioDatagramWorkers
specified in workerCount. The NioDatagramWorkers take care of reading and writing
for the NioDatagramChannel.workerExecutor - the Executor that will run the NioDatagramWorkers
for this sinkworkerCount - the number of NioDatagramWorkers for this sinkpublic void eventSunk(ChannelPipeline pipeline, ChannelEvent e) throws java.lang.Exception
pipeline - the ChannelPipeline that passes down the
downstream event.e - The downstream event.java.lang.Exceptionprivate static void close(NioDatagramChannel channel, ChannelFuture future)
private static void bind(NioDatagramChannel channel, ChannelFuture future, java.net.InetSocketAddress address)
private static void connect(NioDatagramChannel channel, ChannelFuture future, java.net.InetSocketAddress remoteAddress)
NioDatagramWorker nextWorker()