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 IoFilter
s that you can
modify. The IoFilter
s 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 IoFilter
s at all, and the
existing IoSession
s won't get affected by the changes in this builder.
IoFilterChainBuilder
s affect only newly created IoSession
s.
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 TypeMethodDescriptionvoid
void
void
void
void
buildFilterChain
(IoFilterChain chain) Modifies the specified chain.void
clear()
clone()
boolean
boolean
boolean
getAll()
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
- See Also:
-
addAfter
- See Also:
-
remove
- See Also:
-
clear
- Throws:
Exception
- See Also:
-
buildFilterChain
Description copied from interface:IoFilterChainBuilder
Modifies the specified chain.- Specified by:
buildFilterChain
in interfaceIoFilterChainBuilder
- Throws:
Exception
-
toString
-
clone
-