Class AbstractOioWorker<C extends AbstractOioChannel>
java.lang.Object
org.jboss.netty.channel.socket.oio.AbstractOioWorker<C>
- Type Parameters:
C-AbstractOioChannel
- Direct Known Subclasses:
OioDatagramWorker, OioWorker
Abstract base class for Oio-Worker implementations
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidclose(AbstractOioChannel channel, ChannelFuture future) private static voidclose(AbstractOioChannel channel, ChannelFuture future, boolean iothread) voidexecuteInIoThread(Runnable task) Execute the givenRunnablein the IO-Thread.(package private) static booleanisIoThread(AbstractOioChannel channel) (package private) abstract booleanprocess()Process the incoming messages and also is responsible for callChannels.fireMessageReceived(Channel, Object)once a message was processed without errors.private voidvoidrun()(package private) static voidsetInterestOps(AbstractOioChannel channel, ChannelFuture future, int interestOps)
-
Field Details
-
eventQueue
-
channel
-
thread
If this worker has been started thread will be a reference to the thread used when starting. i.e. the current thread when the run method is executed. -
done
private volatile boolean done
-
-
Constructor Details
-
AbstractOioWorker
-
-
Method Details
-
run
-
isIoThread
-
executeInIoThread
-
processEventQueue
private void processEventQueue() -
process
Process the incoming messages and also is responsible for callChannels.fireMessageReceived(Channel, Object)once a message was processed without errors.- Returns:
- continue returns
trueas long as this worker should continue to try processing incoming messages - Throws:
IOException
-
setInterestOps
-
close
-
close
-