public class IoFilterMapping
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean
IoFilter. This makes it possible to configure
named filters using Spring.
Use this class when you want to configure the
filters added to the filter chain of all sessions created from a particular
IoService created using one of the
IoAcceptorFactoryBean
sub-classes but you don't want the names to be generated automatically.
This class can also be used when creating Binding objects. This lets
one configure per-port filters. These filters will only be added to the
filter chain of sessions for incoming connections on the port specified by
the Binding. Note that Binding can also be configured to
generate filter names automatically. In that case you add the IoFilter
instances directly to the Binding.
IoAcceptorFactoryBean,
Binding| Constructor and Description |
|---|
IoFilterMapping()
Creates a new empty instance.
|
IoFilterMapping(java.lang.String name,
org.apache.mina.common.IoFilter filter)
Creates a new instance using the specified name and filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.apache.mina.common.IoFilter |
getFilter()
Returns the filter of this mapping.
|
java.lang.String |
getName()
Returns the name associated with the filter.
|
void |
setFilter(org.apache.mina.common.IoFilter filter)
Sets the filter of this mapping.
|
void |
setName(java.lang.String name)
Sets the name associated with the filter.
|
public IoFilterMapping()
public IoFilterMapping(java.lang.String name,
org.apache.mina.common.IoFilter filter)
name - the name.filter - the filter.java.lang.IllegalArgumentException - if any of the arguments are
null.public org.apache.mina.common.IoFilter getFilter()
public java.lang.String getName()
public void setFilter(org.apache.mina.common.IoFilter filter)
filter - the filter.java.lang.IllegalArgumentException - if the specified value is
null.public void setName(java.lang.String name)
name - the name.java.lang.IllegalArgumentException - if the specified value is
null.public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception