org.apache.mina.io.filter
Class IoThreadPoolFilter
java.lang.Object
org.apache.mina.util.BaseThreadPool
org.apache.mina.io.filter.IoThreadPoolFilter
- All Implemented Interfaces:
- IoFilter, ThreadPool
public class IoThreadPoolFilter
- extends BaseThreadPool
- implements ThreadPool, IoFilter
A Thread-pooling filter. This filter forwards IoHandler
events
to its thread pool.
- Version:
- $Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $
- Author:
- Trustin Lee (trustin@apache.org)
- See Also:
ThreadPool
,
BaseThreadPool
Constructor Summary |
IoThreadPoolFilter()
Creates a new instanceof this filter with default thread pool settings. |
Method Summary |
void |
dataRead(IoFilter.NextFilter nextFilter,
IoSession session,
ByteBuffer buf)
Filters IoHandler.dataRead(IoSession, ByteBuffer) event. |
void |
dataWritten(IoFilter.NextFilter nextFilter,
IoSession session,
Object marker)
Filters IoHandler.dataWritten(IoSession, Object) event. |
void |
exceptionCaught(IoFilter.NextFilter nextFilter,
IoSession session,
Throwable cause)
Filters IoHandler.exceptionCaught(IoSession, Throwable) event. |
void |
filterWrite(IoFilter.NextFilter nextFilter,
IoSession session,
ByteBuffer buf,
Object marker)
Filters IoSession.write(ByteBuffer, Object) method invocation. |
protected void |
processEvent(Object nextFilter0,
Session session0,
EventType type,
Object data)
Implement this method to forward events to nextFilter. |
void |
sessionClosed(IoFilter.NextFilter nextFilter,
IoSession session)
Filters IoHandler.sessionClosed(IoSession) event. |
void |
sessionIdle(IoFilter.NextFilter nextFilter,
IoSession session,
IdleStatus status)
Filters IoHandler.sessionIdle(IoSession, IdleStatus) event. |
void |
sessionOpened(IoFilter.NextFilter nextFilter,
IoSession session)
Filters IoHandler.sessionOpened(IoSession) event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IoThreadPoolFilter
public IoThreadPoolFilter()
- Creates a new instanceof this filter with default thread pool settings.
You'll have to invoke
BaseThreadPool.start()
method to start threads actually.
sessionOpened
public void sessionOpened(IoFilter.NextFilter nextFilter,
IoSession session)
- Description copied from interface:
IoFilter
- Filters
IoHandler.sessionOpened(IoSession)
event.
- Specified by:
sessionOpened
in interface IoFilter
sessionClosed
public void sessionClosed(IoFilter.NextFilter nextFilter,
IoSession session)
- Description copied from interface:
IoFilter
- Filters
IoHandler.sessionClosed(IoSession)
event.
- Specified by:
sessionClosed
in interface IoFilter
sessionIdle
public void sessionIdle(IoFilter.NextFilter nextFilter,
IoSession session,
IdleStatus status)
- Description copied from interface:
IoFilter
- Filters
IoHandler.sessionIdle(IoSession, IdleStatus)
event.
- Specified by:
sessionIdle
in interface IoFilter
exceptionCaught
public void exceptionCaught(IoFilter.NextFilter nextFilter,
IoSession session,
Throwable cause)
- Description copied from interface:
IoFilter
- Filters
IoHandler.exceptionCaught(IoSession, Throwable)
event.
- Specified by:
exceptionCaught
in interface IoFilter
dataRead
public void dataRead(IoFilter.NextFilter nextFilter,
IoSession session,
ByteBuffer buf)
- Description copied from interface:
IoFilter
- Filters
IoHandler.dataRead(IoSession, ByteBuffer)
event.
- Specified by:
dataRead
in interface IoFilter
dataWritten
public void dataWritten(IoFilter.NextFilter nextFilter,
IoSession session,
Object marker)
- Description copied from interface:
IoFilter
- Filters
IoHandler.dataWritten(IoSession, Object)
event.
- Specified by:
dataWritten
in interface IoFilter
processEvent
protected void processEvent(Object nextFilter0,
Session session0,
EventType type,
Object data)
- Description copied from class:
BaseThreadPool
- Implement this method to forward events to nextFilter.
- Specified by:
processEvent
in class BaseThreadPool
filterWrite
public void filterWrite(IoFilter.NextFilter nextFilter,
IoSession session,
ByteBuffer buf,
Object marker)
throws Exception
- Description copied from interface:
IoFilter
- Filters
IoSession.write(ByteBuffer, Object)
method invocation.
- Specified by:
filterWrite
in interface IoFilter
- Throws:
Exception
Copyright © 2004-2005 . All Rights Reserved.