|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.common.ExecutorThreadModel
public class ExecutorThreadModel
A ThreadModel which represents a thread model with an Executor
(from backport-util-concurrent)
per service. The default underlying Executor is ThreadPoolExecutor,
so you can safely downcast the returned Executor of getExecutor() to
ThreadPoolExecutor by default.
| Field Summary |
|---|
| Fields inherited from interface org.apache.mina.common.ThreadModel |
|---|
MANUAL |
| Fields inherited from interface org.apache.mina.common.IoFilterChainBuilder |
|---|
NOOP |
| Method Summary | |
|---|---|
void |
buildFilterChain(IoFilterChain chain)
Modifies the specified chain. |
edu.emory.mathcs.backport.java.util.concurrent.Executor |
getExecutor()
Returns the underlying Executor of this model. |
static ExecutorThreadModel |
getInstance(String serviceName)
Returns a ExecutorThreadModel instance for the specified serviceName. |
void |
setExecutor(edu.emory.mathcs.backport.java.util.concurrent.Executor executor)
Changes the underlying Executor of this model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ExecutorThreadModel getInstance(String serviceName)
ExecutorThreadModel instance for the specified serviceName.
Please note that all returned instances will be managed globally; the same instance
will be returned if you specified the same service name. Please try to specify
different names for different services.
serviceName - the name of the service that needs thread poolingpublic edu.emory.mathcs.backport.java.util.concurrent.Executor getExecutor()
Executor of this model.
You can change various properties such as the number of threads
by calling methods of the Executor implementation.
public void setExecutor(edu.emory.mathcs.backport.java.util.concurrent.Executor executor)
Executor of this model.
Previous settings such as the number of threads should be configured again.
Only newly created IoSessions will be affected.
executor - null to revert to the default setting
public void buildFilterChain(IoFilterChain chain)
throws Exception
IoFilterChainBuilder
buildFilterChain in interface IoFilterChainBuilderException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||