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 void
close
(AbstractOioChannel channel, ChannelFuture future) private static void
close
(AbstractOioChannel channel, ChannelFuture future, boolean iothread) void
executeInIoThread
(Runnable task) Execute the givenRunnable
in the IO-Thread.(package private) static boolean
isIoThread
(AbstractOioChannel channel) (package private) abstract boolean
process()
Process the incoming messages and also is responsible for callChannels.fireMessageReceived(Channel, Object)
once a message was processed without errors.private void
void
run()
(package private) static void
setInterestOps
(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
public void run() -
isIoThread
-
executeInIoThread
Description copied from interface:Worker
Execute the givenRunnable
in the IO-Thread. This may be now or later once the IO-Thread do some other work.- Specified by:
executeInIoThread
in interfaceWorker
- Parameters:
task
- theRunnable
to execute
-
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
true
as long as this worker should continue to try processing incoming messages - Throws:
IOException
-
setInterestOps
-
close
-
close
-