Package com.linecorp.armeria.common
Interface ContextAwareEventLoop
- All Superinterfaces:
AutoCloseable
,ContextAwareExecutor
,ContextAwareExecutorService
,ContextAwareScheduledExecutorService
,ContextHolder
,EventExecutor
,EventExecutorGroup
,EventLoop
,EventLoopGroup
,Executor
,ExecutorService
,Iterable<EventExecutor>
,OrderedEventExecutor
,ScheduledExecutorService
A delegating
EventLoop
that sets the RequestContext
before executing any submitted tasks.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareEventLoop
.static ContextAwareEventLoop
of
(RequestContext context, EventLoop eventLoop) Returns a newContextAwareEventLoop
that sets the specifiedRequestContext
before executing any submitted tasks.Returns theEventLoop
that executes the submitted tasks without setting theRequestContext
.Methods inherited from interface io.netty.util.concurrent.EventExecutor
inEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, next
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
Methods inherited from interface io.netty.channel.EventLoopGroup
next, register, register, register
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
of
Returns a newContextAwareEventLoop
that sets the specifiedRequestContext
before executing any submitted tasks. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareEventLoop
.- Specified by:
context
in interfaceContextAwareExecutor
- Specified by:
context
in interfaceContextAwareExecutorService
- Specified by:
context
in interfaceContextAwareScheduledExecutorService
- Specified by:
context
in interfaceContextHolder
-
withoutContext
EventLoop withoutContext()Returns theEventLoop
that executes the submitted tasks without setting theRequestContext
.- Specified by:
withoutContext
in interfaceContextAwareExecutor
- Specified by:
withoutContext
in interfaceContextAwareExecutorService
- Specified by:
withoutContext
in interfaceContextAwareScheduledExecutorService
-