Package org.apache.mina.filter.logging

Examples of org.apache.mina.filter.logging.MdcInjectionFilter


            acceptor.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE,
                    getIdleTimeout());
            // Decrease the default receiver buffer size
            acceptor.getSessionConfig().setReceiveBufferSize(512);
   
            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();
   
            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);

            SessionFilter sessionFilter = getSessionFilter();
            if (sessionFilter != null) {
View Full Code Here


            IoFilter LOGGING_FILTER = new LoggingFilter();

            IoFilter CODEC_FILTER = new ProtocolCodecFilter(
                    new TextLineCodecFactory());
           
            connector.getFilterChain().addLast("mdc", new MdcInjectionFilter());
            connector.getFilterChain().addLast("codec", CODEC_FILTER);
            connector.getFilterChain().addLast("logger", LOGGING_FILTER);

            if (useSsl) {
                SSLContext sslContext = BogusSslContextFactory
View Full Code Here

                    getIdleTimeout());
            // Decrease the default receiver buffer size
            ((SocketSessionConfig) acceptor.getSessionConfig())
                    .setReceiveBufferSize(512);
   
            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();
   
            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);
   
            // add and update the blacklist filter
            acceptor.getFilterChain().addLast("ipFilter", new BlacklistFilter());
View Full Code Here

        acceptor.getSessionConfig().setReadBufferSize( 2048 );
        acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, idleTimeout );
        // Decrease the default receiver buffer size
        ((SocketSessionConfig) acceptor.getSessionConfig()).setReceiveBufferSize(512);

        MdcInjectionFilter mdcFilter = new MdcInjectionFilter();

        acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);
       
        // add and update the blacklist filter
        acceptor.getFilterChain().addLast("ipFilter", new BlacklistFilter());
View Full Code Here

                    getIdleTimeout());
            // Decrease the default receiver buffer size
            ((SocketSessionConfig) acceptor.getSessionConfig())
                    .setReceiveBufferSize(512);

            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();

            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);

            // add and update the blacklist filter
            acceptor.getFilterChain().addLast("ipFilter", new BlacklistFilter());
View Full Code Here

                    getIdleTimeout());
            // Decrease the default receiver buffer size
            ((SocketSessionConfig) acceptor.getSessionConfig())
                    .setReceiveBufferSize(512);
   
            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();
   
            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);
   
            IpFilter ipFilter = getIpFilter();
            if(ipFilter != null) {
View Full Code Here

                    getIdleTimeout());
            // Decrease the default receiver buffer size
            ((SocketSessionConfig) acceptor.getSessionConfig())
                    .setReceiveBufferSize(512);
   
            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();
   
            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);
   
            // add and update the blacklist filter
            acceptor.getFilterChain().addLast("ipFilter", new BlacklistFilter());
View Full Code Here

                    getIdleTimeout());
            // Decrease the default receiver buffer size
            ((SocketSessionConfig) acceptor.getSessionConfig())
                    .setReceiveBufferSize(512);
   
            MdcInjectionFilter mdcFilter = new MdcInjectionFilter();
   
            acceptor.getFilterChain().addLast("mdcFilter", mdcFilter);
   
            // add and update the blacklist filter
            acceptor.getFilterChain().addLast("ipFilter", new BlacklistFilter());
View Full Code Here

    public static void main(String[] args) throws Exception {
        NioSocketAcceptor acceptor = new NioSocketAcceptor();
        DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();

        MdcInjectionFilter mdcInjectionFilter = new MdcInjectionFilter();
        chain.addLast("mdc", mdcInjectionFilter);

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

            throw new IllegalStateException(
                    "Already connected. Disconnect first.");
        }

        try {
            connector.getFilterChain().addLast("mdc", new MdcInjectionFilter());

            if (useSsl) {
                SSLContext sslContext = BogusSslContextFactory
                        .getInstance(false);
                SslFilter sslFilter = new SslFilter(sslContext);
View Full Code Here

TOP

Related Classes of org.apache.mina.filter.logging.MdcInjectionFilter

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.