org.apache.mina.io.filter
Class BlacklistFilter
java.lang.Object
org.apache.mina.io.IoFilterAdapter
org.apache.mina.io.filter.BlacklistFilter
- All Implemented Interfaces:
- IoFilter
public class BlacklistFilter
- extends IoFilterAdapter
A IoFilter
which blocks connections from blacklisted remote
address.
- Version:
- $Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
- Author:
- The Apache Directory Project (dev@directory.apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlacklistFilter
public BlacklistFilter()
block
public void block(InetAddress address)
- Blocks the specified endpoint.
unblock
public void unblock(InetAddress address)
- Unblocks the specified endpoint.
dataRead
public void dataRead(IoFilter.NextFilter nextFilter,
IoSession session,
ByteBuffer buf)
throws Exception
- Forwards event if and if only the remote address of session is not
blacklisted.
- Specified by:
dataRead
in interface IoFilter
- Overrides:
dataRead
in class IoFilterAdapter
- Throws:
Exception
sessionOpened
public void sessionOpened(IoFilter.NextFilter nextFilter,
IoSession session)
throws Exception
- Close connection immediately if the remote address of session is
blacklisted.
- Specified by:
sessionOpened
in interface IoFilter
- Overrides:
sessionOpened
in class IoFilterAdapter
- Throws:
Exception
Copyright © 2004-2005 . All Rights Reserved.