| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.mina.common.support.AbstractIoFilterChainIoFilterChain that provides
common operations for developers to implement their own transport layer.
The only method a developer should implement is
doWrite(IoSession,IoFilter.WriteRequest). This method is invoked
when filter chain is evaluated for
IoFilter.filterWrite(IoFilter.NextFilter,IoSession,IoFilter.WriteRequest) and
finally to be written out.
Field Summary | |
static String |
|
Constructor Summary | |
| |
Method Summary | |
void | |
void | |
void | |
void | |
void |
|
boolean | |
boolean | |
boolean | |
protected abstract void | |
protected abstract void |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
IoFilter | |
List |
|
List |
|
Entry |
|
IoFilter.NextFilter |
|
IoSession |
|
IoFilter |
|
String |
|
public static final String CONNECT_FUTURE
A session attribute that stores aConnectFuturerelated with theIoSession.AbstractIoFilterChainclears this attribute and notifies the future whenfireSessionOpened(IoSession)orfireExceptionCaught(IoSession,Throwable)is invoked
public void addAfter(String baseName,
String name,
IoFilter filter)Adds the specified filter with the specified name just after the filter whose name isbaseNamein this chain.
- Specified by:
- addAfter in interface IoFilterChain
public void addBefore(String baseName,
String name,
IoFilter filter)Adds the specified filter with the specified name just before the filter whose name isbaseNamein this chain.
- Specified by:
- addBefore in interface IoFilterChain
public void addFirst(String name,
IoFilter filter)Adds the specified filter with the specified name at the beginning of this chain.
- Specified by:
- addFirst in interface IoFilterChain
public void addLast(String name,
IoFilter filter)Adds the specified filter with the specified name at the end of this chain.
- Specified by:
- addLast in interface IoFilterChain
public void clear()
throws ExceptionRemoves all filters added to this chain.
- Specified by:
- clear in interface IoFilterChain
public boolean contains(IoFilter> filterType)
Returns true if this chain contains anIoFilterof the specified filterType.
- Specified by:
- contains in interface IoFilterChain
public boolean contains(String name)
Returns true if this chain contains anIoFilterwith the specified name.
- Specified by:
- contains in interface IoFilterChain
public boolean contains(IoFilter filter)
Returns true if this chain contains the specified filter.
- Specified by:
- contains in interface IoFilterChain
protected abstract void doWrite(IoSession session, IoFilter.WriteRequest writeRequest) throws Exception
protected void finalize()
throws Throwablepublic void fireExceptionCaught(IoSession session, Throwable cause)
Fires aIoHandler.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.
- Specified by:
- fireExceptionCaught in interface IoFilterChain
public void fireFilterClose(IoSession session)
Fires aIoSession.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.
- Specified by:
- fireFilterClose in interface IoFilterChain
public void fireFilterWrite(IoSession session, IoFilter.WriteRequest writeRequest)
Fires aIoSession.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.
- Specified by:
- fireFilterWrite in interface IoFilterChain
public void fireMessageReceived(IoSession session, Object message)
Fires aIoFilterChain.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.
- Specified by:
- fireMessageReceived in interface IoFilterChain
public void fireMessageSent(IoSession session, IoFilter.WriteRequest request)
Fires aIoHandler.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.
- Specified by:
- fireMessageSent in interface IoFilterChain
public void fireSessionClosed(IoSession session)
Fires aIoHandler.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.
- Specified by:
- fireSessionClosed in interface IoFilterChain
public void fireSessionCreated(IoSession session)
Fires aIoHandler.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.
- Specified by:
- fireSessionCreated in interface IoFilterChain
public void fireSessionIdle(IoSession session, IdleStatus status)
Fires aIoHandler.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.
- Specified by:
- fireSessionIdle in interface IoFilterChain
public void fireSessionOpened(IoSession session)
Fires aIoHandler.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.
- Specified by:
- fireSessionOpened in interface IoFilterChain
public IoFilter get(String name)
Returns theIoFilterwith the specified name in this chain.
- Specified by:
- get in interface IoFilterChain
- Returns:
- null if there's no such name in this chain
public ListgetAll()
Returns the list of allIoFilterChain.Entrys this chain contains.
- Specified by:
- getAll in interface IoFilterChain
public ListgetAllReversed()
Returns the reversed list of allIoFilterChain.Entrys this chain contains.
- Specified by:
- getAllReversed in interface IoFilterChain
public Entry getEntry(String name)
Returns theIoFilterChain.Entrywith the specified name in this chain.
- Specified by:
- getEntry in interface IoFilterChain
- Returns:
- null if there's no such name in this chain
public IoFilter.NextFilter getNextFilter(String name)
Returns theIoFilter.NextFilterof theIoFilterwith the specified name in this chain.
- Specified by:
- getNextFilter in interface IoFilterChain
- Returns:
- null if there's no such name in this chain
public IoSession getSession()
Returns the parentIoSessionof this chain.
- Specified by:
- getSession in interface IoFilterChain
- Returns:
IoSession
public IoFilter remove(String name)
Removes the filter with the specified name from this chain.
- Specified by:
- remove in interface IoFilterChain
public String toString()