directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r350119 - /directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java
Date Thu, 01 Dec 2005 02:57:03 GMT
Author: trustin
Date: Wed Nov 30 18:57:01 2005
New Revision: 350119

URL: http://svn.apache.org/viewcvs?rev=350119&view=rev
Log:
Added description on IoFilter life cycle.

Modified:
    directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java

Modified: directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java?rev=350119&r1=350118&r2=350119&view=diff
==============================================================================
--- directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java
(original)
+++ directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilter.java
Wed Nov 30 18:57:01 2005
@@ -36,6 +36,29 @@
  * {@link IoSession}s.</strong> Users can cache the reference to the
  * session, which might malfunction if any filters are added or removed later.
  * 
+ * <h3>The Life Cycle</h3>
+ * When you add an {@link IoFilter} to an {@link IoFilterChain}:
+ * <ol>
+ *   <li>{@link #init()} is invoked by {@link IoFilterChain} if the filter is
+ *       added at the first time.</li>
+ *   <li>The filter is added to the chain, and all events and I/O requests
+ *       pass through the filter from now.</li>
+ *   <li>{@link #onAdd(IoFilterChain, String, NextFilter)} is invoked to notify
+ *       that the filter is added to the chain.</li>
+ *   <li>The filter is removed from the chain if {@link #onAdd(IoFilterChain, String,
org.apache.mina.common.IoFilter.NextFilter)}
+ *       threw an exception.  {@link #destroy()} is also invoked if the filter
+ *       is the last filter which was added to {@link IoFilterChain}s.</li>
+ * </ol>
+ * 
+ * When you remove an {@link IoFilter} from an {@link IoFilterChain}:
+ * <ol>
+ *   <li>The filter is removed from the chain, and any events and I/O requests
+ *       don't pass through the filter from now.</li>
+ *   <li>{@link #onRemove(IoFilterChain, String, NextFilter)} is invoked to
+ *       notify that the filter is removed from the chain.</li>
+ *   <li>{@link #destroy()} is invoked if the removed filter was the last one.</li>
+ * </ol>      
+ * 
  * @author The Apache Directory Project (dev@directory.apache.org)
  * @version $Rev$, $Date$
  * 



Mime
View raw message