|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractFactoryBean
org.apache.mina.integration.spring.DefaultIoFilterChainBuilderFactoryBean
public class DefaultIoFilterChainBuilderFactoryBean
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.
Constructor Summary | |
---|---|
DefaultIoFilterChainBuilderFactoryBean()
|
Method Summary | |
---|---|
protected Object |
createInstance()
|
Class |
getObjectType()
|
void |
setFilterMappings(IoFilterMapping[] filterMappings)
Sets a number of named filters which will be added to the filter chain created by this factory bean. |
void |
setFilterNamePrefix(String prefix)
Sets the prefix used to create the names for automatically named filters added using setFilters(IoFilter[]) . |
void |
setFilters(IoFilter[] filters)
Sets a number of unnamed filters which will be added to the filter chain created by this factory bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultIoFilterChainBuilderFactoryBean()
Method Detail |
---|
protected Object createInstance() throws Exception
Exception
public Class getObjectType()
public void setFilterNamePrefix(String prefix)
setFilters(IoFilter[])
. The default prefix is
filter.
prefix
- the prefix.
IllegalArgumentException
- if the specified value is
null
.public void setFilters(IoFilter[] filters)
<filterNamePrefix>0
,
<filterNamePrefix>1
, etc).
filters
- the filters.
IllegalArgumentException
- if the specified value is
null
.setFilterNamePrefix(String)
public void setFilterMappings(IoFilterMapping[] filterMappings)
IoFilterMapping
objects
set using this method which haven't had their name set will be assigned
automatically generated names derived from the prefix set using
setFilterNamePrefix(String)
and the position in the specified
array (i.e. <filterNamePrefix><pos>
).
filterMappings
- the name to filter mappings.
IllegalArgumentException
- if the specified value is
null
.setFilterNamePrefix(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |