You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/11/30 08:00:03 UTC

svn commit: r349901 - in /directory/network/branches/chain_refactor/src/java/org/apache/mina/common: IoFilterChain.java support/AbstractIoFilterChain.java

Author: trustin
Date: Tue Nov 29 22:59:55 2005
New Revision: 349901

URL: http://svn.apache.org/viewcvs?rev=349901&view=rev
Log:
* Removed IoFilterChain manipulation methods based on IoFilter reference

Modified:
    directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilterChain.java
    directory/network/branches/chain_refactor/src/java/org/apache/mina/common/support/AbstractIoFilterChain.java

Modified: directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilterChain.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilterChain.java?rev=349901&r1=349900&r2=349901&view=diff
==============================================================================
--- directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilterChain.java (original)
+++ directory/network/branches/chain_refactor/src/java/org/apache/mina/common/IoFilterChain.java Tue Nov 29 22:59:55 2005
@@ -85,13 +85,6 @@
     IoFilter remove( String name ) throws Exception;
 
     /**
-     * Removes the specifiec <tt>filter</tt> from this chain.
-     * @return the name of the removed {@link IoFilter}
-     * @throws Exception if {@link IoFilter#destroy(IoFilterChain, NextFilter)} thrown an exception.
-     */
-    String remove( IoFilter filter ) throws Exception;
-
-    /**
      * Removes all filters added to this chain.
      * @throws Exception if {@link IoFilter#destroy(IoFilterChain, NextFilter)} thrown an exception.
      */

Modified: directory/network/branches/chain_refactor/src/java/org/apache/mina/common/support/AbstractIoFilterChain.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/chain_refactor/src/java/org/apache/mina/common/support/AbstractIoFilterChain.java?rev=349901&r1=349900&r2=349901&view=diff
==============================================================================
--- directory/network/branches/chain_refactor/src/java/org/apache/mina/common/support/AbstractIoFilterChain.java (original)
+++ directory/network/branches/chain_refactor/src/java/org/apache/mina/common/support/AbstractIoFilterChain.java Tue Nov 29 22:59:55 2005
@@ -290,13 +290,6 @@
         return entry.getFilter();
     }
 
-    public synchronized String remove( IoFilter filter ) throws Exception
-    {
-        EntryImpl entry = getEntry( filter );
-        deregister( entry );
-        return entry.name;
-    }
-
     public synchronized void clear() throws Exception
     {
         Iterator it = new ArrayList( name2entry.keySet() ).iterator();
@@ -330,18 +323,6 @@
         filter2entry.remove( filter );
         
         filter.destroy( this, entry.getNextFilter() );
-    }
-
-    private EntryImpl getEntry( IoFilter filter )
-    {
-        EntryImpl entry = ( EntryImpl ) filter2entry.get( filter );
-        if( entry == null )
-        {
-            throw new IllegalArgumentException(
-                    "The specified filter doesn't belong to this filter chain." );
-        }
-
-        return entry;
     }
 
     /**