Class NioDatagramWorker
java.lang.Object
org.jboss.netty.channel.socket.nio.AbstractNioSelector
org.jboss.netty.channel.socket.nio.AbstractNioWorker
org.jboss.netty.channel.socket.nio.NioDatagramWorker
- All Implemented Interfaces:
Runnable
,NioSelector
,Worker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
RegisterTask is a task responsible for registering a channel with a selector. -
Field Summary
FieldsFields inherited from class org.jboss.netty.channel.socket.nio.AbstractNioWorker
sendBufferPool
Fields inherited from class org.jboss.netty.channel.socket.nio.AbstractNioSelector
logger, selector, startupLatch, thread, wakenUp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Runnable
createRegisterTask
(Channel channel, ChannelFuture future) (package private) static void
disconnect
(NioDatagramChannel channel, ChannelFuture future) protected boolean
read
(SelectionKey key) Read is called when a Selector has been notified that the underlying channel was something to be read.void
run()
protected boolean
scheduleWriteIfNecessary
(AbstractNioChannel<?> channel) protected void
write0
(AbstractNioChannel<?> channel) void
writeFromUserCode
(AbstractNioChannel<?> channel) Methods inherited from class org.jboss.netty.channel.socket.nio.AbstractNioWorker
cleanUpWriteBuffer, clearOpWrite, close, close, executeInIoThread, executeInIoThread, isIoThread, newThreadRenamingRunnable, process, setInterestOps, setOpWrite, writeFromSelectorLoop, writeFromTaskLoop
Methods inherited from class org.jboss.netty.channel.socket.nio.AbstractNioSelector
cleanUpCancelledKeys, increaseCancelledKeys, isIoThread, rebuildSelector, register, registerTask, select, shutdown
-
Field Details
-
bufferAllocator
-
-
Constructor Details
-
NioDatagramWorker
NioDatagramWorker(Executor executor) Sole constructor.- Parameters:
executor
- theExecutor
used to executeRunnable
s such asNioDatagramWorker.ChannelRegistionTask
-
-
Method Details
-
read
Description copied from class:AbstractNioWorker
Read is called when a Selector has been notified that the underlying channel was something to be read. The channel would previously have registered its interest in read operations.- Specified by:
read
in classAbstractNioWorker
- Parameters:
key
- The selection key which contains the Selector registration information.
-
scheduleWriteIfNecessary
- Specified by:
scheduleWriteIfNecessary
in classAbstractNioWorker
-
disconnect
-
createRegisterTask
- Specified by:
createRegisterTask
in classAbstractNioSelector
-
writeFromUserCode
- Overrides:
writeFromUserCode
in classAbstractNioWorker
-
write0
- Overrides:
write0
in classAbstractNioWorker
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Overrides:
run
in classAbstractNioWorker
-