public class ChainedExecutor extends Object implements Executor, ExternalResourceReleasable
Constructor and Description |
---|
ChainedExecutor(ChannelEventRunnableFilter filter,
Executor cur,
Executor next)
Create a new
ChainedExecutor which will used the given
ChannelEventRunnableFilter to see if the cur Executor should get
used. |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable command)
Execute the passed
ChannelEventRunnable with the current Executor if the
ChannelEventRunnableFilter match. |
void |
releaseExternalResources()
Releases the external resources that this object depends on.
|
public ChainedExecutor(ChannelEventRunnableFilter filter, Executor cur, Executor next)
ChainedExecutor
which will used the given
ChannelEventRunnableFilter
to see if the cur
Executor
should get
used. Otherwise it will pass the work to the next
Executor
filter
- the ChannelEventRunnableFilter
which will be used to check if the
ChannelEventRunnable
should be passed to the cur or next Executor
cur
- the Executor
to use if the ChannelEventRunnableFilter
matchnext
- the Executor
to use if the ChannelEventRunnableFilter
does not matchpublic void execute(Runnable command)
ChannelEventRunnable
with the current Executor
if the
ChannelEventRunnableFilter
match. Otherwise pass it to the next Executor
in
the chain.public void releaseExternalResources()
ExternalResourceReleasable
releaseExternalResources
in interface ExternalResourceReleasable
Copyright © 2008-2013 The Netty Project. All Rights Reserved.