public interface IoFilterChain
IoFilter
s that forwards IoHandler
events
to the consisting filters and terminal IoHandler
sequentially.
Every IoSession
has its own IoFilterChain
(1-to-1 relationship).Modifier and Type | Interface and Description |
---|---|
static interface |
IoFilterChain.Entry
Represents a name-filter pair that an
IoFilterChain contains. |
Modifier and Type | Method and Description |
---|---|
void |
addAfter(java.lang.String baseName,
java.lang.String name,
IoFilter filter)
Adds the specified filter with the specified name just after the filter whose name is
baseName in this chain. |
void |
addBefore(java.lang.String baseName,
java.lang.String name,
IoFilter filter)
Adds the specified filter with the specified name just before the filter whose name is
baseName in this chain. |
void |
addFirst(java.lang.String name,
IoFilter filter)
Adds the specified filter with the specified name at the beginning of this chain.
|
void |
addLast(java.lang.String name,
IoFilter filter)
Adds the specified filter with the specified name at the end of this chain.
|
void |
clear()
Removes all filters added to this chain.
|
boolean |
contains(java.lang.Class<? extends IoFilter> filterType)
Returns true if this chain contains an
IoFilter of the
specified filterType. |
boolean |
contains(IoFilter filter)
Returns true if this chain contains the specified filter.
|
boolean |
contains(java.lang.String name)
Returns true if this chain contains an
IoFilter with the
specified name. |
void |
fireExceptionCaught(IoSession session,
java.lang.Throwable cause)
Fires a
IoHandler.exceptionCaught(IoSession, Throwable) event. |
void |
fireFilterClose(IoSession session)
Fires a
IoSession.close() event. |
void |
fireFilterWrite(IoSession session,
IoFilter.WriteRequest writeRequest)
Fires a
IoSession.write(Object) event. |
void |
fireMessageReceived(IoSession session,
java.lang.Object message)
Fires a
fireMessageReceived(IoSession, Object) event. |
void |
fireMessageSent(IoSession session,
IoFilter.WriteRequest request)
Fires a
IoHandler.sessionOpened(IoSession) event. |
void |
fireSessionClosed(IoSession session)
Fires a
IoHandler.sessionClosed(IoSession) event. |
void |
fireSessionCreated(IoSession session)
Fires a
IoHandler.sessionCreated(IoSession) event. |
void |
fireSessionIdle(IoSession session,
IdleStatus status)
Fires a
IoHandler.sessionIdle(IoSession, IdleStatus) event. |
void |
fireSessionOpened(IoSession session)
Fires a
IoHandler.sessionOpened(IoSession) event. |
IoFilter |
get(java.lang.String name)
Returns the
IoFilter with the specified name in this chain. |
java.util.List<IoFilterChain.Entry> |
getAll()
Returns the list of all
IoFilterChain.Entry s this chain contains. |
java.util.List<IoFilterChain.Entry> |
getAllReversed()
Returns the reversed list of all
IoFilterChain.Entry s this chain contains. |
IoFilterChain.Entry |
getEntry(java.lang.String name)
Returns the
IoFilterChain.Entry with the specified name in this chain. |
IoFilter.NextFilter |
getNextFilter(java.lang.String name)
Returns the
IoFilter.NextFilter of the IoFilter with the
specified name in this chain. |
IoSession |
getSession()
Returns the parent
IoSession of this chain. |
IoFilter |
remove(java.lang.String name)
Removes the filter with the specified name from this chain.
|
IoFilterChain.Entry getEntry(java.lang.String name)
IoFilterChain.Entry
with the specified name in this chain.IoFilter get(java.lang.String name)
IoFilter
with the specified name in this chain.IoFilter.NextFilter getNextFilter(java.lang.String name)
IoFilter.NextFilter
of the IoFilter
with the
specified name in this chain.java.util.List<IoFilterChain.Entry> getAll()
IoFilterChain.Entry
s this chain contains.java.util.List<IoFilterChain.Entry> getAllReversed()
IoFilterChain.Entry
s this chain contains.boolean contains(java.lang.String name)
IoFilter
with the
specified name.boolean contains(IoFilter filter)
boolean contains(java.lang.Class<? extends IoFilter> filterType)
IoFilter
of the
specified filterType.void addFirst(java.lang.String name, IoFilter filter)
IoFilterLifeCycleException
- if IoFilter.onPostAdd(IoFilterChain, String, NextFilter)
or
IoFilter.init()
throws an exception.void addLast(java.lang.String name, IoFilter filter)
IoFilterLifeCycleException
- if IoFilter.onPostAdd(IoFilterChain, String, NextFilter)
or
IoFilter.init()
throws an exception.void addBefore(java.lang.String baseName, java.lang.String name, IoFilter filter)
baseName
in this chain.IoFilterLifeCycleException
- if IoFilter.onPostAdd(IoFilterChain, String, NextFilter)
or
IoFilter.init()
throws an exception.void addAfter(java.lang.String baseName, java.lang.String name, IoFilter filter)
baseName
in this chain.IoFilterLifeCycleException
- if IoFilter.onPostAdd(IoFilterChain, String, NextFilter)
or
IoFilter.init()
throws an exception.IoFilter remove(java.lang.String name)
IoFilterLifeCycleException
- if IoFilter.onPostRemove(IoFilterChain, String, NextFilter)
or
IoFilter.destroy()
throws an exception.void clear() throws java.lang.Exception
java.lang.Exception
- if IoFilter.onPostRemove(IoFilterChain, String, NextFilter)
thrown an exception.void fireSessionCreated(IoSession session)
IoHandler.sessionCreated(IoSession)
event. Most users don't need to
call this method at all. Please use this method only when you implement a new transport
or fire a virtual event.void fireSessionOpened(IoSession session)
IoHandler.sessionOpened(IoSession)
event. Most users don't need to call
this method at all. Please use this method only when you implement a new transport or
fire a virtual event.void fireSessionClosed(IoSession session)
IoHandler.sessionClosed(IoSession)
event. Most users don't need to call
this method at all. Please use this method only when you implement a new transport or
fire a virtual event.void fireSessionIdle(IoSession session, IdleStatus status)
IoHandler.sessionIdle(IoSession, IdleStatus)
event. Most users don't
need to call this method at all. Please use this method only when you implement a new
transport or fire a virtual event.void fireMessageReceived(IoSession session, java.lang.Object message)
fireMessageReceived(IoSession, Object)
event. Most users don't need to
call this method at all. Please use this method only when you implement a new transport
or fire a virtual event.void fireMessageSent(IoSession session, IoFilter.WriteRequest request)
IoHandler.sessionOpened(IoSession)
event. Most users don't need to call
this method at all. Please use this method only when you implement a new transport or
fire a virtual event.void fireExceptionCaught(IoSession session, java.lang.Throwable cause)
IoHandler.exceptionCaught(IoSession, Throwable)
event. Most users don't
need to call this method at all. Please use this method only when you implement a new
transport or fire a virtual event.void fireFilterWrite(IoSession session, IoFilter.WriteRequest writeRequest)
IoSession.write(Object)
event. Most users don't need to call this
method at all. Please use this method only when you implement a new transport or fire a
virtual event.void fireFilterClose(IoSession session)
IoSession.close()
event. Most users don't need to call this method at
all. Please use this method only when you implement a new transport or fire a virtual
event.Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.