Package org.mockserver.logging

Examples of org.mockserver.logging.LoggingHandler


                        // Create a default pipeline implementation.
                        ChannelPipeline pipeline = ch.pipeline();

                        // add logging
                        if (logger.isDebugEnabled()) {
                            pipeline.addLast("logger", new LoggingHandler(logger));
                        }

                        // add HTTPS proxy -> server support
                        if (secure) {
                            SSLEngine engine = SSLFactory.getInstance().sslContext().createSSLEngine();
View Full Code Here


            pipeline.addLast("ssl", new SslHandler(engine));
        }

        // add logging
        if (logger.isDebugEnabled()) {
            pipeline.addLast("logger", new LoggingHandler());
        }

        // add msg <-> HTTP
        pipeline.addLast("decoder-encoder", new HttpServerCodec());
        pipeline.addLast("chunk-aggregator", new HttpObjectAggregator(Integer.MAX_VALUE));
View Full Code Here

                                                clientEngine.setUseClientMode(true);
                                                outboundChannel.pipeline().addLast("outbound relay ssl", new SslHandler(clientEngine));
                                            }
                                            Logger outboundLogger = LoggerFactory.getLogger("                -->");
                                            if (logger.isDebugEnabled()) {
                                                outboundChannel.pipeline().addLast("outbound relay logger", new LoggingHandler(outboundLogger));
                                            }
                                            outboundChannel.pipeline().addLast(new ProxyRelayHandler(ctx.channel(), 1048576, new RequestInterceptor(null), outboundLogger));


                                            // upstream
                                            if (secure) {
                                                SSLEngine serverEngine = SSLFactory.getInstance().sslContext().createSSLEngine();
                                                serverEngine.setUseClientMode(false);
                                                ctx.channel().pipeline().addLast("upstream relay ssl", new SslHandler(serverEngine));
                                            }
                                            Logger inboundLogger = LoggerFactory.getLogger("<-- ");
                                            if (logger.isDebugEnabled()) {
                                                ctx.channel().pipeline().addLast("upstream relay logger", new LoggingHandler(inboundLogger));
                                            }
                                            ctx.channel().pipeline().addLast(new ProxyRelayHandler(outboundChannel, 1048576, new ResponseInterceptor(), inboundLogger));
                                        }
                                    });
                        } else {
View Full Code Here

TOP

Related Classes of org.mockserver.logging.LoggingHandler

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.