Package org.apache.mina.filter

Examples of org.apache.mina.filter.LoggingFilter


            cfg.getFilterChain().addLast(
                    "codec",
                    new ProtocolCodecFilter(
                            new ObjectSerializationCodecFactory()));
        }
        cfg.getFilterChain().addLast("logger", new LoggingFilter());

        acceptor.bind(new InetSocketAddress(SERVER_PORT),
                new ServerSessionHandler(), cfg);

        System.out.println("Listening on port " + SERVER_PORT);
View Full Code Here


            cfg.getFilterChain().addLast(
                    "codec",
                    new ProtocolCodecFilter(
                            new ObjectSerializationCodecFactory()));
        }
        cfg.getFilterChain().addLast("logger", new LoggingFilter());

        IoSession session;
        for (;;) {
            try {
                ConnectFuture future = connector.connect(new InetSocketAddress(
View Full Code Here

    /**
     * @see archean.util.mina.IoSessionManagerMBean#addLastLoggingFilter()
     */
    public void addLastLoggingFilter() {
        LoggingFilter f = new LoggingFilter();
        session.getFilterChain().addLast("LoggerLast", f);
    }
View Full Code Here

    /**
     * @see archean.util.mina.IoSessionManagerMBean#addFirstLoggingFilter()
     */
    public void addFirstLoggingFilter() {
        LoggingFilter f = new LoggingFilter();
        session.getFilterChain().addFirst("LoggerFirst", f);
    }
View Full Code Here

            SocketAcceptorConfig cfg = new SocketAcceptorConfig();
            cfg.setReuseAddress( true );
            cfg.getFilterChain().addLast(
                    "protocolFilter",
                    new ProtocolCodecFilter( new HttpServerProtocolCodecFactory() ) );
            cfg.getFilterChain().addLast( "logger", new LoggingFilter() );

            acceptor.bind( new InetSocketAddress( port ), new ServerHandler(), cfg );

            System.out.println( "Server now listening on port " + port );
        }
View Full Code Here

        System.out.println( "SSL ON" );
    }
   
    private static void addLogger( DefaultIoFilterChainBuilder chain ) throws Exception
    {
        chain.addLast( "logger", new LoggingFilter() );
        System.out.println( "Logging ON" );
    }
View Full Code Here

        {
            cfg.getFilterChain().addLast(
                    "codec",
                    new ProtocolCodecFilter( new ObjectSerializationCodecFactory() ) );
        }
        cfg.getFilterChain().addLast( "logger", new LoggingFilter() );

        acceptor.bind(
                new InetSocketAddress( SERVER_PORT ),
                new ServerSessionHandler( ), cfg );
View Full Code Here

        IoAcceptor acceptor = new SocketAcceptor();

        // Prepare the configuration
        SocketAcceptorConfig cfg = new SocketAcceptorConfig();
        cfg.setReuseAddress( true );
        cfg.getFilterChain().addLast( "logger", new LoggingFilter() );
        cfg.getFilterChain().addLast(
                "codec",
                new ProtocolCodecFilter(
                        new TextLineCodecFactory( Charset.forName( "UTF-8" ) ) ) );
View Full Code Here

        {
            cfg.getFilterChain().addLast(
                    "codec",
                    new ProtocolCodecFilter( new ObjectSerializationCodecFactory() ) );
        }
        cfg.getFilterChain().addLast( "logger", new LoggingFilter() );
       
        IoSession session;
        for( ;; )
        {
            try
View Full Code Here

    }

   
    private static void addLogger( DefaultIoFilterChainBuilder chain ) throws Exception
    {
        chain.addLast( "logger", new LoggingFilter() );
        System.out.println( "Logging ON" );
    }
View Full Code Here

TOP

Related Classes of org.apache.mina.filter.LoggingFilter

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.