Package org.jboss.netty.handler.logging

Examples of org.jboss.netty.handler.logging.LoggingHandler


    _dummyServer = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(),
                                                  SimpleTestServerConnection.ServerType.NIO);
    _dummyServer.setPipelineFactory(new ChannelPipelineFactory() {
        @Override
        public ChannelPipeline getPipeline() throws Exception {
            return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG),
                                     new HttpServerCodec(),
                                     new LoggingHandler(InternalLogLevel.DEBUG),
                                     new SimpleObjectCaptureHandler());
        }
    });
    _dummyServer.start(SERVER_ADDRESS_ID);
View Full Code Here


      _dummyServer[relayN] = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(),
                                                SimpleTestServerConnection.ServerType.NIO);
      _dummyServer[relayN].setPipelineFactory(new ChannelPipelineFactory() {
        @Override
        public ChannelPipeline getPipeline() throws Exception {
          return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG),
              new HttpServerCodec(),
              new LoggingHandler(InternalLogLevel.DEBUG),
              new SimpleObjectCaptureHandler());
        }
      });
      _dummyServer[relayN].start(RELAY_PORT[relayN]);
    }
View Full Code Here

      _dummyServer[relayN] = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(),
                                                SimpleTestServerConnection.ServerType.NIO);
      _dummyServer[relayN].setPipelineFactory(new ChannelPipelineFactory() {
        @Override
        public ChannelPipeline getPipeline() throws Exception {
          return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG),
              new HttpServerCodec(),
              new LoggingHandler(InternalLogLevel.DEBUG),
              new SimpleObjectCaptureHandler());
        }
      });
      _dummyServer[relayN].start(RELAY_PORT[relayN]);
    }
View Full Code Here

  private void setupServer(DummyHttpRequestHandler requestHandler)
  {
    _serverBootstrap = new ServerBootstrap(new DefaultLocalServerChannelFactory());
    ChannelPipeline serverPipeline = pipeline();
    serverPipeline.addLast("server logger 1", new LoggingHandler("server logger 1", InternalLogLevel.DEBUG, true));
    serverPipeline.addLast("decoder", new HttpRequestDecoder());
    serverPipeline.addLast("encoder", new HttpResponseEncoder());
    serverPipeline.addLast("server loggger 5", new LoggingHandler("server logger 5", InternalLogLevel.DEBUG, true));
    serverPipeline.addLast("handler", requestHandler);
    _serverBootstrap.setPipeline(serverPipeline);

    _serverAddress = new LocalAddress(1);
    _serverChannel = _serverBootstrap.bind(_serverAddress);
View Full Code Here

      @Override
      public ChannelPipeline getPipeline() throws Exception
      {
        ChannelPipeline clientPipeline = pipeline();

        clientPipeline.addLast("client logger 1", new LoggingHandler("client logger 1", InternalLogLevel.DEBUG, true));
        clientPipeline.addLast("codec", new HttpClientCodec());
        clientPipeline.addLast("aggregator", new FooterAwareHttpChunkAggregator(1000000));
        _responseHandler = new SimpleHttpResponseHandler();
        clientPipeline.addLast("handler", _responseHandler);
        clientPipeline.addLast("client logger 5", new LoggingHandler("client logger 5", InternalLogLevel.DEBUG, true));
        return clientPipeline;
      }
    });
  }
View Full Code Here

      if (Logger.getRootLogger().isTraceEnabled())
      {
        LOG.debug("Adding Netty tracing");
        pipeline.addLast("netty client traffic",
                         new LoggingHandler("netty client traffic", InternalLogLevel.DEBUG, true));
      }

      if (null != _containerStatsCollector)
      {
        pipeline.addLast("inbound statistics collector",
View Full Code Here

                         new ConnectionChannelRegistrationHandler(_serverContainer.getHttpChannelGroup()));

        if (Logger.getRootLogger().isTraceEnabled())
        {
          pipeline.addLast("netty server traffic",
                           new LoggingHandler("netty server traffic", InternalLogLevel.DEBUG, true));
        }

        pipeline.addLast("outbound statistics collector",
                         new OutboundContainerStatisticsCollectingHandler(
                             _serverContainer.getContainerStatsCollector()));
View Full Code Here

                     new ConnectionChannelRegistrationHandler(_serverContainer.getTcpChannelGroup()));

    if (Logger.getRootLogger().isTraceEnabled())
    {
      pipeline.addLast("netty server traffic",
                       new LoggingHandler("netty server traffic", InternalLogLevel.DEBUG, true));
    }

    pipeline.addLast("outbound statistics collector",
                     new OutboundContainerStatisticsCollectingHandler(
                         _serverContainer.getContainerStatsCollector()));

    ExtendedWriteTimeoutHandler writeTimeoutHandler =
        new ExtendedWriteTimeoutHandler("server container " + _serverContainer.getContainerStaticConfig().getId(),
                                        _serverContainer.getNetworkTimeoutTimer(),
                                        _serverContainer.getContainerStaticConfig().getWriteTimeoutMs(),
                                        true);

    ExtendedReadTimeoutHandler readTimeoutHandler =
        new ExtendedReadTimeoutHandler("server container " + _serverContainer.getContainerStaticConfig().getId(),
                                       _serverContainer.getNetworkTimeoutTimer(),
                                       _serverContainer.getContainerStaticConfig().getReadTimeoutMs(),
                                       true);
    pipeline.addLast("read timeout", readTimeoutHandler);

    //add a handler to deal with write timeouts
    pipeline.addLast("server container write timeout handler", writeTimeoutHandler);

    pipeline.addLast("decoder",
                     new SimpleBinaryDatabusRequestDecoder(_serverContainer.getCommandsRegistry(),
                                                           readTimeoutHandler,
                                                           _byteOrder));
    pipeline.addLast("encoder", new SimpleBinaryDatabusResponseEncoder());

    // Fix for DDSDBUS-1000
//    pipeline.addLast("executionHandler", _serverContainer.getNettyExecHandler());

    //Dummy handler that will be automatically replaced depending on the current command being
    //executed
    pipeline.addLast(SimpleBinaryDatabusRequestDecoder.REQUEST_EXEC_HANDLER_NAME,
                     new LoggingHandler("netty server traffic", InternalLogLevel.DEBUG, true));


    return pipeline;
  }
View Full Code Here

  private ChannelPipeline createPipeline() throws Exception
  {
    ChannelPipeline clientPipeline = pipeline();

    clientPipeline.addLast("client logger 1", new LoggingHandler("client logger 1", InternalLogLevel.DEBUG, true));
    clientPipeline.addLast("codec", new HttpClientCodec());
    clientPipeline.addLast("aggregator", new FooterAwareHttpChunkAggregator(1000000));
    _responseHandler = new SimpleHttpResponseHandler();
    clientPipeline.addLast("handler", _responseHandler);
    clientPipeline.addLast("client logger 5", new LoggingHandler("client logger 5", InternalLogLevel.DEBUG, true));
    return clientPipeline;
  }
View Full Code Here

    _dummyServer = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(),
                                                  SimpleTestServerConnection.ServerType.NIO);
    _dummyServer.setPipelineFactory(new ChannelPipelineFactory() {
        @Override
        public ChannelPipeline getPipeline() throws Exception {
            return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG),
                                     new HttpServerCodec(),
                                     new LoggingHandler(InternalLogLevel.DEBUG),
                                     new SimpleObjectCaptureHandler());
        }
    });
    _dummyServer.start(SERVER_ADDRESS_ID);
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.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.