Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.filter
Class BlacklistFilter

    java.lang.Object
      org.apache.mina.common.IoFilterAdapter
          org.apache.mina.filter.BlacklistFilter

All Implemented Interfaces:
  IoFilter

    public class BlacklistFilter

extends IoFilterAdapter

A `IoFilter` which blocks connections from blacklisted remote address.

Version:
  $Rev: 587373 $, $Date: 2007-10-23 04:54:05 +0200 (Tue, 23 Oct 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.mina.common.IoFilter
`IoFilter.NextFilter, IoFilter.WriteRequest`

Constructor Summary
`BlacklistFilter()`

Method Summary
`void` | `block(InetAddress address)` Blocks the specified endpoint.
`void` | `block(InetAddress address, String error_string)` Blocks the specified endpoint.
`void` | `messageReceived(IoFilter.NextFilter nextFilter, IoSession session, Object message)` Filters `IoHandler.messageReceived(IoSession,Object)` event.
`void` | `messageSent(IoFilter.NextFilter nextFilter, IoSession session, Object message)` Filters `IoHandler.messageSent(IoSession,Object)` event.
`void` | `sessionClosed(IoFilter.NextFilter nextFilter, IoSession session)` Filters `IoHandler.sessionClosed(IoSession)` event.
`void` | `sessionCreated(IoFilter.NextFilter nextFilter, IoSession session)` Filters `IoHandler.sessionCreated(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.
`void` | `setBlacklist(Collection<InetAddress> addresses)` Sets the addresses to be blacklisted.
`void` | `setBlacklist(InetAddress... addresses)` Sets the addresses to be blacklisted.
`void` | `unblock(InetAddress address)` Unblocks the specified endpoint.

Methods inherited from class org.apache.mina.common.IoFilterAdapter
`destroy, exceptionCaught, filterClose, filterWrite, init, onPostAdd, onPostRemove, onPreAdd, onPreRemove`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BlacklistFilter

    public BlacklistFilter()

Method Detail

### setBlacklist

    public void setBlacklist(InetAddress... addresses)

  Sets the addresses to be blacklisted. NOTE: this call will remove any previously blacklisted addresses.

  Parameters:
    `addresses` - an array of addresses to be blacklisted.

### setBlacklist

    public void setBlacklist(Collection<InetAddress> addresses)

  Sets the addresses to be blacklisted. NOTE: this call will remove any previously blacklisted addresses.

  Parameters:
    `addresses` - a collection of InetAddress objects representing the addresses to be blacklisted.
  Throws:
    `IllegalArgumentException` - if the specified collections contains non-`InetAddress` objects.

### block

    public void block(InetAddress address,
                      String error_string)

  Blocks the specified endpoint.

### block

    public void block(InetAddress address)

  Blocks the specified endpoint.

### unblock

    public void unblock(InetAddress address)

  Unblocks the specified endpoint.

### sessionCreated

    public void sessionCreated(IoFilter.NextFilter nextFilter,
                               IoSession session)

  Description copied from interface: `IoFilter`
  Filters `IoHandler.sessionCreated(IoSession)` event.

  Specified by:
    `sessionCreated` in interface `IoFilter`
  Overrides:
    `sessionCreated` in class `IoFilterAdapter`

### 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`
  Overrides:
    `sessionOpened` in class `IoFilterAdapter`
  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`
  Overrides:
    `sessionClosed` in class `IoFilterAdapter`
  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`
  Overrides:
    `sessionIdle` in class `IoFilterAdapter`
  Throws:
    `Exception`

### messageReceived

    public void messageReceived(IoFilter.NextFilter nextFilter,
                                IoSession session,
                                Object message)

  Description copied from interface: `IoFilter`
  Filters `IoHandler.messageReceived(IoSession,Object)` event.

  Specified by:
    `messageReceived` in interface `IoFilter`
  Overrides:
    `messageReceived` in class `IoFilterAdapter`

### messageSent

    public void messageSent(IoFilter.NextFilter nextFilter,
                            IoSession session,
                            Object message)
                     throws Exception

  Description copied from interface: `IoFilter`
  Filters `IoHandler.messageSent(IoSession,Object)` event.

  Specified by:
    `messageSent` in interface `IoFilter`
  Overrides:
    `messageSent` in class `IoFilterAdapter`
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.