public class ExecutorThreadModel extends java.lang.Object implements ThreadModel
ThreadModelwhich represents a thread model with an
Executorper service. The default underlying
ThreadPoolExecutor, so you can safely downcast the returned
|Modifier and Type||Method and Description|
Modifies the specified chain.
Returns the underlying
Changes the underlying
public static ExecutorThreadModel getInstance(java.lang.String serviceName)
ExecutorThreadModelinstance 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 pooling
public java.util.concurrent.Executor getExecutor()
Executorof this model. You can change various properties such as the number of threads by calling methods of the
public void setExecutor(java.util.concurrent.Executor executor)
Executorof 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
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.