Package org.apache.mina.common
Class DefaultIoFilterChainBuilder
java.lang.Object
org.apache.mina.common.DefaultIoFilterChainBuilder
- All Implemented Interfaces:
Cloneable,IoFilterChainBuilder
The default implementation of
IoFilterChainBuilder which is useful
in most cases. DefaultIoFilterChainBuilder has an identical interface
with IoFilter; it contains a list of IoFilters that you can
modify. The IoFilters which are added to this builder will be appended
to the IoFilterChain when buildFilterChain(IoFilterChain) is
invoked.
However, the identical interface doesn't mean that it behaves in an exactly
same way with IoFilterChain. DefaultIoFilterChainBuilder
doesn't manage the life cycle of the IoFilters at all, and the
existing IoSessions won't get affected by the changes in this builder.
IoFilterChainBuilders affect only newly created IoSessions.
IoAcceptor acceptor = ...; DefaultIoFilterChainBuilder builder = acceptor.getFilterChain(); builder.addLast( "myFilter", new MyFilter() ); ...
-
Field Summary
Fields inherited from interface org.apache.mina.common.IoFilterChainBuilder
NOOP -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with an empty filter list. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidbuildFilterChain(IoFilterChain chain) Modifies the specified chain.voidclear()clone()booleanbooleanbooleangetAll()toString()
-
Constructor Details
-
DefaultIoFilterChainBuilder
public DefaultIoFilterChainBuilder()Creates a new instance with an empty filter list.
-
-
Method Details
-
getEntry
- See Also:
-
get
- See Also:
-
getAll
- See Also:
-
getAllReversed
- See Also:
-
contains
- See Also:
-
contains
- See Also:
-
contains
- See Also:
-
addFirst
- See Also:
-
addLast
- See Also:
-
addBefore
-
addAfter
-
remove
- See Also:
-
clear
- Throws:
Exception- See Also:
-
buildFilterChain
Description copied from interface:IoFilterChainBuilderModifies the specified chain.- Specified by:
buildFilterChainin interfaceIoFilterChainBuilder- Throws:
Exception
-
toString
-
clone
-