public abstract class SingleThreadEventLoop extends SingleThreadEventExecutor implements EventLoop
EventLoops that execute all its submitted tasks in a single thread.| Modifier | Constructor and Description |
|---|---|
protected |
SingleThreadEventLoop(EventLoopGroup parent,
Executor executor,
boolean addTaskWakesUp) |
| Modifier and Type | Method and Description |
|---|---|
ChannelHandlerInvoker |
asInvoker()
Creates a new default
ChannelHandlerInvoker implementation that uses this EventLoop to
invoke event handler methods. |
EventLoop |
next()
Returns a reference to itself.
|
EventLoopGroup |
parent()
Return the
EventExecutorGroup which is the parent of this EventExecutor, |
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
|
EventLoop |
unwrap()
Returns an
EventExecutor that is not a WrappedEventExecutor. |
protected boolean |
wakesUpForTask(Runnable task) |
addShutdownHook, addTask, awaitTermination, cleanup, cleanupAndTerminate, confirmShutdown, delayNanos, execute, hasTasks, inEventLoop, isShutdown, isShuttingDown, isTerminated, newTaskQueue, peekTask, pendingTasks, pollTask, reject, removeShutdownHook, removeTask, run, runAllTasks, runAllTasks, scheduleExecution, shutdown, shutdownGracefully, takeTask, terminationFuture, updateLastExecutionTime, wakeupcancelScheduledTasks, hasScheduledTasks, nanoTime, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelaychildren, close, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, shutdownGracefully, shutdownNow, submit, submit, submitinvokeAll, invokeAll, invokeAny, invokeAnyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchildren, inEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFutureisShuttingDown, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFutureawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedcloseprotected SingleThreadEventLoop(EventLoopGroup parent, Executor executor, boolean addTaskWakesUp)
public EventLoopGroup parent()
EventExecutorEventExecutorGroup which is the parent of this EventExecutor,parent in interface EventLoopparent in interface EventExecutorparent in class AbstractEventExecutorpublic EventLoop next()
EventExecutornext in interface EventLoopGroupnext in interface EventExecutornext in interface EventExecutorGroupnext in class AbstractEventExecutorpublic ChannelHandlerInvoker asInvoker()
EventLoopChannelHandlerInvoker implementation that uses this EventLoop to
invoke event handler methods.public ChannelFuture register(Channel channel)
EventLoopGroupChannel with an EventLoop from this EventLoopGroup. The returned
ChannelFuture will get notified once the registration is completed.
It's only safe to submit a new task to the EventLoop from within a
ChannelHandler once the ChannelPromise succeeded. Otherwise
the task may or may not be rejected.
register in interface EventLoopGrouppublic ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroupChannel with an EventLoop from this EventLoopGroup. The provided
ChannelPromise will get notified once the registration is completed. The returned ChannelFuture
is the same ChannelPromise that was passed to the method.
It's only safe to submit a new task to the EventLoop from within a
ChannelHandler once the ChannelPromise succeeded. Otherwise
the task may or may not be rejected.
register in interface EventLoopGroupprotected boolean wakesUpForTask(Runnable task)
wakesUpForTask in class SingleThreadEventExecutorpublic EventLoop unwrap()
EventExecutorEventExecutor that is not a WrappedEventExecutor.
WrappedEventExecutor implementing this method must return the underlying
EventExecutor while making sure that it's not a WrappedEventExecutor
(e.g. by multiple calls to EventExecutor.unwrap()).
EventExecutor that is not a WrappedEventExecutor must return a reference to itself.
unwrap in interface EventLoopunwrap in interface EventExecutorunwrap in class AbstractEventExecutorCopyright © 2008–2015 The Netty Project. All rights reserved.