Class DefaultIoFilterChainBuilderFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean
org.apache.mina.integration.spring.DefaultIoFilterChainBuilderFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean
,org.springframework.beans.factory.InitializingBean
public class DefaultIoFilterChainBuilderFactoryBean
extends org.springframework.beans.factory.config.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
or
by using
invalid reference
#setFilterMappings(IoFilterMapping[])
directly which assigns automatically
generated names to each invalid reference
#setFilters(IoFilter[])
IoFilter
. Use the
setFilterNamePrefix(String)
method to set the prefix used for
auto generated names.
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
void
setFilterNamePrefix
(String prefix) Sets the prefix used to create the names for automatically named filters added usinginvalid reference
#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, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
DefaultIoFilterChainBuilderFactoryBean
public DefaultIoFilterChainBuilderFactoryBean()
-
-
Method Details
-
createInstance
- Specified by:
createInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean
-
setFilterNamePrefix
Sets the prefix used to create the names for automatically named filters added usinginvalid reference
#setFilters(IoFilter[])
- Parameters:
prefix
- the prefix.- Throws:
IllegalArgumentException
- if the specified value isnull
.
-
setFilters
Sets a number of filters which will be added to the filter chain created by this factory bean. The specified list must contain eitherIoFilter
orIoFilterMapping
objects. Filters which haven't been wrapped inIoFilterMapping
objects will be assigned automatically generated names (<filterNamePrefix>0
,<filterNamePrefix>1
, etc).- Parameters:
filters
- the list ofIoFilter
and/orIoFilterMapping
objects.- Throws:
IllegalArgumentException
- if the specified value isnull
or contains objects of the wrong type.- See Also:
-