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 DefaultIoFilterChainBuilderFactoryBean

    java.lang.Object
      org.springframework.beans.factory.config.AbstractFactoryBean
          org.apache.mina.integration.spring.DefaultIoFilterChainBuilderFactoryBean

All Implemented Interfaces:
  BeanFactoryAware, DisposableBean, FactoryBean, InitializingBean

    public class DefaultIoFilterChainBuilderFactoryBean

extends AbstractFactoryBean

Spring `FactoryBean` which creates `DefaultIoFilterChainBuilder` instances. This factory bean makes it possible to configure the filters to be added to all the sessions created by an `IoAcceptor` or `IoConnector` using Spring.

The filters may be set up in two ways. By creating `IoFilterMapping` objects which associate a name with an `IoFilter` instance and set them using `#setFilterMappings(IoFilterMapping[])` or by using `#setFilters(IoFilter[])` directly which assigns automatically generated names to each `IoFilter`. Use the `setFilterNamePrefix(String)` method to set the prefix used for auto generated names.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Field Summary

Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
`logger`

Constructor Summary
`DefaultIoFilterChainBuilderFactoryBean()`

Method Summary
`protected Object` | `createInstance()`
`Class` | `getObjectType()`
`void` | `setFilterNamePrefix(String prefix)` Sets the prefix used to create the names for automatically named filters added using `#setFilters(IoFilter[])`.
`void` | `setFilters(List filters)` Sets a number of filters which will be added to the filter chain created by this factory bean.

Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
`afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanFactory, setSingleton`

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

Constructor Detail

### DefaultIoFilterChainBuilderFactoryBean

    public DefaultIoFilterChainBuilderFactoryBean()

Method Detail

### createInstance

    protected Object createInstance()
                             throws Exception

  Specified by:
    `createInstance` in class `AbstractFactoryBean`
  Throws:
    `Exception`

### getObjectType

    public Class getObjectType()

  Specified by:
    `getObjectType` in interface `FactoryBean`
  Specified by:
    `getObjectType` in class `AbstractFactoryBean`

### setFilterNamePrefix

    public void setFilterNamePrefix(String prefix)

  Sets the prefix used to create the names for automatically named filters added using `#setFilters(IoFilter[])`. The default prefix is `filter`.

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

### setFilters

    public void setFilters(List filters)

  Sets a number of filters which will be added to the filter chain created by this factory bean. The specified list must contain either `IoFilter` or `IoFilterMapping` objects. Filters which haven't been wrapped in `IoFilterMapping` objects will be assigned automatically generated names (`<filterNamePrefix>0`, `<filterNamePrefix>1`, etc).

  Parameters:
    `filters` - the list of `IoFilter` and/or `IoFilterMapping` objects.
  Throws:
    `IllegalArgumentException` - if the specified value is `null` or contains objects of the wrong type.
  See Also:
    `setFilterNamePrefix(String)`

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.