Package org.apache.mina.common

Examples of org.apache.mina.common.DefaultIoFilterChainBuilder


    private IoFilterMapping[] filterMappings = new IoFilterMapping[0];

    private String prefix = "filter";

    protected Object createInstance() throws Exception {
        DefaultIoFilterChainBuilder builder = new DefaultIoFilterChainBuilder();
        for (int i = 0; i < filterMappings.length; i++) {
            String name = filterMappings[i].getName();
            if (name == null) {
                name = prefix + i;
            }
            builder.addLast(name, filterMappings[i].getFilter());
        }

        return builder;
    }
View Full Code Here


    public void setFilterChainBuilder( IoFilterChainBuilder builder )
    {
        if( builder == null )
        {
            builder = new DefaultIoFilterChainBuilder();
        }
        filterChainBuilder = builder;
    }
View Full Code Here

    public static void main( String[] args ) throws Exception
    {
        IoAcceptor acceptor = new SocketAcceptor();
        IoAcceptorConfig config = new SocketAcceptorConfig();
        DefaultIoFilterChainBuilder chain = config.getFilterChain();
       
        // Add SSL filter if SSL is enabled.
        if( USE_SSL )
        {
            addSSLSupport( chain  );
View Full Code Here

    public void setFilterChainBuilder( IoFilterChainBuilder builder )
    {
        if( builder == null )
        {
            builder = new DefaultIoFilterChainBuilder();
        }
        filterChainBuilder = builder;
    }
View Full Code Here

    public static void main( String[] args ) throws Exception
    {
        IoAcceptor acceptor = new SocketAcceptor();
        IoAcceptorConfig config = new SocketAcceptorConfig();
        DefaultIoFilterChainBuilder chain = config.getFilterChain();

        // Add SSL filter if SSL is enabled.
        if( USE_SSL )
        {
            addSSLSupport( chain );
View Full Code Here

   
    public static void main( String[] args ) throws Exception
    {
        IoAcceptor acceptor = new SocketAcceptor();
        IoAcceptorConfig config = new SocketAcceptorConfig();
        DefaultIoFilterChainBuilder chain = config.getFilterChain();
       
        // Add SSL filter if SSL is enabled.
        if( USE_SSL )
        {
            addSSLSupport( chain  );
        }
       
        chain.addLast( "codec", new ProtocolCodecFilter( new TextLineCodecFactory() ) );
       
        addLogger( chain );
       
        // Bind
        acceptor.bind(
View Full Code Here

       
        DefaultIoFilterChainBuilderFactoryBean factory =
                                   new DefaultIoFilterChainBuilderFactoryBean();
        factory.setFilters( Arrays.asList( filters ) );
        factory.setFilterNamePrefix( "prefix" );
        DefaultIoFilterChainBuilder builder =
                             ( DefaultIoFilterChainBuilder) factory.createInstance();
        builder.buildFilterChain( chain );
       
        mockChain.verify();
    }
View Full Code Here

        mockChain.replay();
       
        DefaultIoFilterChainBuilderFactoryBean factory =
                                   new DefaultIoFilterChainBuilderFactoryBean();
        factory.setFilters( mappings );
        DefaultIoFilterChainBuilder builder =
                             ( DefaultIoFilterChainBuilder) factory.createInstance();
        builder.buildFilterChain( chain );
       
        mockChain.verify();
    }   
View Full Code Here

    private IoFilterMapping[] filterMappings = new IoFilterMapping[ 0 ];
    private String prefix = "filter";

    protected Object createInstance() throws Exception
    {
        DefaultIoFilterChainBuilder builder = new DefaultIoFilterChainBuilder();
        for( int i = 0; i < filterMappings.length; i++ )
        {
            String name = filterMappings[ i ].getName();
            if( name == null )
            {
                name = prefix + i;
            }
            builder.addLast( name, filterMappings[ i ].getFilter() );
        }
       
        return builder;
    }
View Full Code Here

    public static void main( String[] args ) throws Exception
    {
        IoAcceptor acceptor = new SocketAcceptor();
        IoAcceptorConfig config = new SocketAcceptorConfig();
        DefaultIoFilterChainBuilder chain = config.getFilterChain();
       
        // Add SSL filter if SSL is enabled.
        if( USE_SSL )
        {
            addSSLSupport( chain  );
View Full Code Here

TOP

Related Classes of org.apache.mina.common.DefaultIoFilterChainBuilder

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.