Class ChainedExecutor
java.lang.Object
org.jboss.netty.handler.execution.ChainedExecutor
- All Implemented Interfaces:
Executor
,ExternalResourceReleasable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChainedExecutor
(ChannelEventRunnableFilter filter, Executor cur, Executor next) Create a newChainedExecutor
which will used the givenChannelEventRunnableFilter
to see if thecur
Executor
should get used. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Execute the passedChannelEventRunnable
with the currentExecutor
if theChannelEventRunnableFilter
match.private static void
releaseExternal
(Executor executor) void
Releases the external resources that this object depends on.
-
Field Details
-
cur
-
next
-
filter
-
-
Constructor Details
-
ChainedExecutor
Create a newChainedExecutor
which will used the givenChannelEventRunnableFilter
to see if thecur
Executor
should get used. Otherwise it will pass the work to thenext
Executor
- Parameters:
filter
- theChannelEventRunnableFilter
which will be used to check if theChannelEventRunnable
should be passed to the cur or nextExecutor
cur
- theExecutor
to use if theChannelEventRunnableFilter
matchnext
- theExecutor
to use if theChannelEventRunnableFilter
does not match
-
-
Method Details
-
execute
Execute the passedChannelEventRunnable
with the currentExecutor
if theChannelEventRunnableFilter
match. Otherwise pass it to the nextExecutor
in the chain. -
releaseExternalResources
public void releaseExternalResources()Description copied from interface:ExternalResourceReleasable
Releases the external resources that this object depends on. You should not call this method if the external resources (e.g. thread pool) are in use by other objects.- Specified by:
releaseExternalResources
in interfaceExternalResourceReleasable
-
releaseExternal
-