org.apache.mina.io
Class IoFilterAdapter

java.lang.Object
  extended by org.apache.mina.io.IoFilterAdapter
All Implemented Interfaces:
IoFilter
Direct Known Subclasses:
BlacklistFilter, SSLFilter

public class IoFilterAdapter
extends Object
implements IoFilter

An abstract adapter class for IoFilter. You can extend this class and selectively override required event filter methods only. All methods forwards events to the next filter by default.

Please refer to BlacklistFilter example.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.mina.io.IoFilter
IoFilter.NextFilter
 
Constructor Summary
IoFilterAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoFilterAdapter

public IoFilterAdapter()
Method Detail

sessionOpened

public void sessionOpened(IoFilter.NextFilter nextFilter,
                          IoSession session)
                   throws Exception
Description copied from interface: IoFilter
Filters IoHandler.sessionOpened(IoSession) event.

Specified by:
sessionOpened in interface IoFilter
Throws:
Exception

sessionClosed

public void sessionClosed(IoFilter.NextFilter nextFilter,
                          IoSession session)
                   throws Exception
Description copied from interface: IoFilter
Filters IoHandler.sessionClosed(IoSession) event.

Specified by:
sessionClosed in interface IoFilter
Throws:
Exception

sessionIdle

public void sessionIdle(IoFilter.NextFilter nextFilter,
                        IoSession session,
                        IdleStatus status)
                 throws Exception
Description copied from interface: IoFilter
Filters IoHandler.sessionIdle(IoSession, IdleStatus) event.

Specified by:
sessionIdle in interface IoFilter
Throws:
Exception

exceptionCaught

public void exceptionCaught(IoFilter.NextFilter nextFilter,
                            IoSession session,
                            Throwable cause)
                     throws Exception
Description copied from interface: IoFilter
Filters IoHandler.exceptionCaught(IoSession, Throwable) event.

Specified by:
exceptionCaught in interface IoFilter
Throws:
Exception

dataRead

public void dataRead(IoFilter.NextFilter nextFilter,
                     IoSession session,
                     ByteBuffer buf)
              throws Exception
Description copied from interface: IoFilter
Filters IoHandler.dataRead(IoSession, ByteBuffer) event.

Specified by:
dataRead in interface IoFilter
Throws:
Exception

dataWritten

public void dataWritten(IoFilter.NextFilter nextFilter,
                        IoSession session,
                        Object marker)
                 throws Exception
Description copied from interface: IoFilter
Filters IoHandler.dataWritten(IoSession, Object) event.

Specified by:
dataWritten in interface IoFilter
Throws:
Exception

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.