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 newChainedExecutorwhich will used the givenChannelEventRunnableFilterto see if thecurExecutorshould get used. -
Method Summary
Modifier and TypeMethodDescriptionvoidExecute the passedChannelEventRunnablewith the currentExecutorif theChannelEventRunnableFiltermatch.private static voidreleaseExternal(Executor executor) voidReleases the external resources that this object depends on.
-
Field Details
-
cur
-
next
-
filter
-
-
Constructor Details
-
ChainedExecutor
Create a newChainedExecutorwhich will used the givenChannelEventRunnableFilterto see if thecurExecutorshould get used. Otherwise it will pass the work to thenextExecutor- Parameters:
filter- theChannelEventRunnableFilterwhich will be used to check if theChannelEventRunnableshould be passed to the cur or nextExecutorcur- theExecutorto use if theChannelEventRunnableFiltermatchnext- theExecutorto use if theChannelEventRunnableFilterdoes not match
-
-
Method Details
-
execute
Execute the passedChannelEventRunnablewith the currentExecutorif theChannelEventRunnableFiltermatch. Otherwise pass it to the nextExecutorin the chain. -
releaseExternalResources
public void releaseExternalResources()Description copied from interface:ExternalResourceReleasableReleases 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:
releaseExternalResourcesin interfaceExternalResourceReleasable
-
releaseExternal
-