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.AbstractFactoryBeanSpringFactoryBeanwhich createsDefaultIoFilterChainBuilderinstances. This factory bean makes it possible to configure the filters to be added to all the sessions created by anIoAcceptororIoConnectorusing Spring.The filters may be set up in two ways. By creating
IoFilterMappingobjects which associate a name with anIoFilterinstance and set them using#setFilterMappings(IoFilterMapping[])or by using#setFilters(IoFilter[])directly which assigns automatically generated names to eachIoFilter. Use thesetFilterNamePrefix(String)method to set the prefix used for auto generated names.
-
-
Constructor Summary
Constructors Constructor Description DefaultIoFilterChainBuilderFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcreateInstance()java.lang.ClassgetObjectType()voidsetFilterNamePrefix(java.lang.String prefix)Sets the prefix used to create the names for automatically named filters added using#setFilters(IoFilter[]).voidsetFilters(java.util.List filters)Sets a number of filters which will be added to the filter chain created by this factory bean.
-
-
-
Method Detail
-
createInstance
protected java.lang.Object createInstance() throws java.lang.Exception- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean- Throws:
java.lang.Exception
-
getObjectType
public java.lang.Class getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean
-
setFilterNamePrefix
public void setFilterNamePrefix(java.lang.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:
java.lang.IllegalArgumentException- if the specified value isnull.
-
setFilters
public void setFilters(java.util.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 eitherIoFilterorIoFilterMappingobjects. Filters which haven't been wrapped inIoFilterMappingobjects will be assigned automatically generated names (<filterNamePrefix>0,<filterNamePrefix>1, etc).- Parameters:
filters- the list ofIoFilterand/orIoFilterMappingobjects.- Throws:
java.lang.IllegalArgumentException- if the specified value isnullor contains objects of the wrong type.- See Also:
setFilterNamePrefix(String)
-
-