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:
- 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: 437002 $, $Date: 2006-08-26 00:47:20 +0200 (Sat, 26 Aug 2006) $
- Author:
- The Apache Directory Project (mina-dev@directory.apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultIoFilterChainBuilderFactoryBean
public DefaultIoFilterChainBuilderFactoryBean()
createInstance
protected Object createInstance()
throws Exception
- Specified by:
createInstance
in class AbstractFactoryBean
- Throws:
Exception
getObjectType
public Class getObjectType()
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)
Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.