org.apache.mina.filter.executor
Class ExecutorFilter
- IoFilter
public class ExecutorFilter
A filter that forward events to
Executor in
backport-util-concurrent.
You can apply various thread model by inserting this filter to the
IoFilterChain.
Please note that this filter doesn't manage the life cycle of the underlying
Executor. You have to destroy or stop it by yourself.
ExecutorFilter()- Creates a new instace with the default thread pool implementation
(new ThreadPoolExecutor(16, 16, 60, TimeUnit.SECONDS, new LinkedBlockingQueue() )).
|
ExecutorFilter(Executor executor)- Creates a new instance with the specified executor.
|
void | exceptionCaught(NextFilter nextFilter, IoSession session, Throwable cause)
|
void | filterClose(NextFilter nextFilter, IoSession session)
|
void | filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest)
|
Executor | getExecutor()- Returns the underlying
Executor instance this filter uses.
|
void | messageReceived(NextFilter nextFilter, IoSession session, Object message)
|
void | messageSent(NextFilter nextFilter, IoSession session, Object message)
|
protected void | processEvent(NextFilter nextFilter, IoSession session, ExecutorFilter.EventType type, Object data)
|
void | sessionClosed(NextFilter nextFilter, IoSession session)
|
void | sessionCreated(NextFilter nextFilter, IoSession session)
|
void | sessionIdle(NextFilter nextFilter, IoSession session, IdleStatus status)
|
void | sessionOpened(NextFilter nextFilter, IoSession session)
|
destroy, exceptionCaught, filterClose, filterWrite, init, messageReceived, messageSent, onPostAdd, onPostRemove, onPreAdd, onPreRemove, sessionClosed, sessionCreated, sessionIdle, sessionOpened |
ExecutorFilter
public ExecutorFilter()
Creates a new instace with the default thread pool implementation
(new ThreadPoolExecutor(16, 16, 60, TimeUnit.SECONDS, new LinkedBlockingQueue() )).
ExecutorFilter
public ExecutorFilter(Executor executor)
Creates a new instance with the specified executor.
getExecutor
public Executor getExecutor()
Returns the underlying Executor instance this filter uses.