org.apache.mina.io
Interface IoFilter

All Known Implementing Classes:
BlacklistFilter, IoFilterAdapter, IoLoggingFilter, IoThreadPoolFilter, SSLFilter

public interface IoFilter

A filter which intercepts IoHandler events like Servlet filters. Filters can be used for these purposes:

Please refer to BlacklistFilter example.

Please NEVER implement your filters to wrap IoSessions. Users can cache the reference to the session, which might malfunction if any filters are added or removed later.

Version:
$Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
Author:
The Apache Directory Project (dev@directory.apache.org)
See Also:
IoFilterAdapter

Nested Class Summary
static interface IoFilter.NextFilter
           
 
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.
 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.
 

Method Detail

sessionOpened

void sessionOpened(IoFilter.NextFilter nextFilter,
                   IoSession session)
                   throws Exception
Filters IoHandler.sessionOpened(IoSession) event.

Throws:
Exception

sessionClosed

void sessionClosed(IoFilter.NextFilter nextFilter,
                   IoSession session)
                   throws Exception
Filters IoHandler.sessionClosed(IoSession) event.

Throws:
Exception

sessionIdle

void sessionIdle(IoFilter.NextFilter nextFilter,
                 IoSession session,
                 IdleStatus status)
                 throws Exception
Filters IoHandler.sessionIdle(IoSession, IdleStatus) event.

Throws:
Exception

exceptionCaught

void exceptionCaught(IoFilter.NextFilter nextFilter,
                     IoSession session,
                     Throwable cause)
                     throws Exception
Filters IoHandler.exceptionCaught(IoSession, Throwable) event.

Throws:
Exception

dataRead

void dataRead(IoFilter.NextFilter nextFilter,
              IoSession session,
              ByteBuffer buf)
              throws Exception
Filters IoHandler.dataRead(IoSession, ByteBuffer) event.

Throws:
Exception

dataWritten

void dataWritten(IoFilter.NextFilter nextFilter,
                 IoSession session,
                 Object marker)
                 throws Exception
Filters IoHandler.dataWritten(IoSession, Object) event.

Throws:
Exception

filterWrite

void filterWrite(IoFilter.NextFilter nextFilter,
                 IoSession session,
                 ByteBuffer buf,
                 Object marker)
                 throws Exception
Filters IoSession.write(ByteBuffer, Object) method invocation.

Throws:
Exception


Copyright © 2004-2005 . All Rights Reserved.