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.integration.spring
Class IoFilterMapping

    java.lang.Object
      org.apache.mina.integration.spring.IoFilterMapping

All Implemented Interfaces:
  InitializingBean

    public class IoFilterMapping

extends Object
implements InitializingBean

Associates a name with an `IoFilter`. This makes it possible to configure named filters using Spring.

Use this class when you want to configure the filters added to the filter chain of all sessions created from a particular `IoService` created using one of the `IoAcceptorFactoryBean` sub-classes but you don't want the names to be generated automatically.

This class can also be used when creating `Binding` objects. This lets one configure per-port filters. These filters will only be added to the filter chain of sessions for incoming connections on the port specified by the `Binding`. Note that `Binding` can also be configured to generate filter names automatically. In that case you add the `IoFilter` instances directly to the `Binding`.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)
See Also:
  `IoAcceptorFactoryBean`, `Binding`

Constructor Summary
`IoFilterMapping()` Creates a new empty instance.
`IoFilterMapping(String name, IoFilter filter)` Creates a new instance using the specified name and filter.

Method Summary
`void` | `afterPropertiesSet()`
`IoFilter` | `getFilter()` Returns the filter of this mapping.
`String` | `getName()` Returns the name associated with the filter.
`void` | `setFilter(IoFilter filter)` Sets the filter of this mapping.
`void` | `setName(String name)` Sets the name associated with the filter.

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

Constructor Detail

### IoFilterMapping

    public IoFilterMapping()

  Creates a new empty instance.

### IoFilterMapping

    public IoFilterMapping(String name,
                           IoFilter filter)

  Creates a new instance using the specified name and filter.

  Parameters:
    `name` - the name.
    `filter` - the filter.
  Throws:
    `IllegalArgumentException` - if any of the arguments are `null`.

Method Detail

### getFilter

    public IoFilter getFilter()

  Returns the filter of this mapping.

  Returns:
    the filter.

### getName

    public String getName()

  Returns the name associated with the filter.

  Returns:
    the name.

### setFilter

    public void setFilter(IoFilter filter)

  Sets the filter of this mapping.

  Parameters:
    `filter` - the filter.
  Throws:
    `IllegalArgumentException` - if the specified value is `null`.

### setName

    public void setName(String name)

  Sets the name associated with the filter.

  Parameters:
    `name` - the name.
  Throws:
    `IllegalArgumentException` - if the specified value is `null`.

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  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.