Package org.apache.mina.common.IoFilterChain

Examples of org.apache.mina.common.IoFilterChain.Entry


     */
    public boolean contains( Class filterType )
    {
        for( Iterator i = entries.iterator(); i.hasNext(); )
        {
            Entry e = ( Entry ) i.next();
            if( filterType.isAssignableFrom( e.getFilter().getClass() ) )
            {
                return true;
            }
        }
       
View Full Code Here


    {
        checkBaseName( baseName );
       
        for( ListIterator i = entries.listIterator(); i.hasNext(); )
        {
            Entry base = ( Entry ) i.next();
            if( base.getName().equals( baseName ) )
            {
                register( i.previousIndex(), new EntryImpl( name, filter ) );
                break;
            }
        }
View Full Code Here

       
        List entries = new ArrayList( this.entries );
       
        for( ListIterator i = entries.listIterator(); i.hasNext(); )
        {
            Entry base = ( Entry ) i.next();
            if( base.getName().equals( baseName ) )
            {
                register( i.nextIndex(), new EntryImpl( name, filter ) );
                break;
            }
        }
View Full Code Here

            throw new NullPointerException( "name" );
        }

        for( ListIterator i = entries.listIterator(); i.hasNext(); )
        {
            Entry e = ( Entry ) i.next();
            if( e.getName().equals( name ) )
            {
                deregister( i.previousIndex(), e );
                return e.getFilter();
            }
        }
       
        throw new IllegalArgumentException( "Unknown filter name: " + name );
    }
View Full Code Here

        chain.addAfter( "D", "H", new EventOrderTestFilter( 'A' ) );
       
        String actual = "";
        for( Iterator i = chain.getAll().iterator(); i.hasNext(); )
        {
            Entry e = ( Entry ) i.next();
            actual += e.getName();
        }
       
        Assert.assertEquals( "FCAEBGDH", actual );
    }
View Full Code Here

        builder.addAfter( "D", "H", new IoFilterAdapter() );
       
        String actual = "";
        for( Iterator i = builder.getAll().iterator(); i.hasNext(); )
        {
            Entry e = ( Entry ) i.next();
            actual += e.getName();
        }
       
        Assert.assertEquals( "FCAEBGDH", actual );
    }
View Full Code Here

        chain.addAfter( "D", "H", new EventOrderTestFilter( 'A' ) );
       
        String actual = "";
        for( Iterator i = chain.getAll().iterator(); i.hasNext(); )
        {
            Entry e = ( Entry ) i.next();
            actual += e.getName();
        }
       
        Assert.assertEquals( "FCAEBGDH", actual );
    }
View Full Code Here

    }

    public Object clone() {
        DefaultIoFilterChainBuilder ret = new DefaultIoFilterChainBuilder();
        for (Iterator i = entries.iterator(); i.hasNext();) {
            Entry e = (Entry) i.next();
            ret.addLast(e.getName(), e.getFilter());
        }
        return ret;
    }
View Full Code Here

        chain.addAfter("B", "G", new EventOrderTestFilter('A'));
        chain.addAfter("D", "H", new EventOrderTestFilter('A'));

        String actual = "";
        for (Iterator i = chain.getAll().iterator(); i.hasNext();) {
            Entry e = (Entry) i.next();
            actual += e.getName();
        }

        Assert.assertEquals("FCAEBGDH", actual);
    }
View Full Code Here

    /**
     * @see IoFilterChain#getEntry(String)
     */
    public Entry getEntry(String name) {
        for (Iterator i = entries.iterator(); i.hasNext(); ) {
            Entry e = (Entry) i.next();
            if (e.getName().equals(name)) {
                return e;
            }
        }
       
        return null;
View Full Code Here

TOP

Related Classes of org.apache.mina.common.IoFilterChain.Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.