Search in sources :

Example 1 with PacketEncoder

use of com.navercorp.pinpoint.rpc.codec.PacketEncoder in project pinpoint by naver.

the class PinpointClientPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("encoder", new PacketEncoder());
    pipeline.addLast("decoder", new PacketDecoder());
    long pingDelay = pinpointClientFactory.getPingDelay();
    long enableWorkerPacketDelay = pinpointClientFactory.getEnableWorkerPacketDelay();
    long timeoutMillis = pinpointClientFactory.getTimeoutMillis();
    DefaultPinpointClientHandler defaultPinpointClientHandler = new DefaultPinpointClientHandler(pinpointClientFactory, pingDelay, enableWorkerPacketDelay, timeoutMillis);
    pipeline.addLast("writeTimeout", new WriteTimeoutHandler(defaultPinpointClientHandler.getChannelTimer(), 3000, TimeUnit.MILLISECONDS));
    pipeline.addLast("socketHandler", defaultPinpointClientHandler);
    return pipeline;
}
Also used : PacketEncoder(com.navercorp.pinpoint.rpc.codec.PacketEncoder) WriteTimeoutHandler(org.jboss.netty.handler.timeout.WriteTimeoutHandler) PacketDecoder(com.navercorp.pinpoint.rpc.codec.PacketDecoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 2 with PacketEncoder

use of com.navercorp.pinpoint.rpc.codec.PacketEncoder in project pinpoint by naver.

the class ServerPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    // ServerPacketDecoder passes the PING related packets(without status value) to the pinpointServerChannelHandler.
    pipeline.addLast("decoder", new ServerPacketDecoder());
    pipeline.addLast("encoder", new PacketEncoder());
    pipeline.addLast("handler", pinpointServerChannelHandler);
    return pipeline;
}
Also used : PacketEncoder(com.navercorp.pinpoint.rpc.codec.PacketEncoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ServerPacketDecoder(com.navercorp.pinpoint.rpc.codec.ServerPacketDecoder)

Example 3 with PacketEncoder

use of com.navercorp.pinpoint.rpc.codec.PacketEncoder in project pinpoint by naver.

the class ClientCodecPipelineFactory method newPipeline.

@Override
public ChannelPipeline newPipeline() {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("encoder", new PacketEncoder());
    pipeline.addLast("decoder", new PacketDecoder());
    return pipeline;
}
Also used : PacketEncoder(com.navercorp.pinpoint.rpc.codec.PacketEncoder) PacketDecoder(com.navercorp.pinpoint.rpc.codec.PacketDecoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 4 with PacketEncoder

use of com.navercorp.pinpoint.rpc.codec.PacketEncoder in project pinpoint by naver.

the class ServerCodecPipelineFactory method newPipeline.

@Override
public ChannelPipeline newPipeline() {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("decoder", new ServerPacketDecoder());
    pipeline.addLast("encoder", new PacketEncoder());
    return pipeline;
}
Also used : PacketEncoder(com.navercorp.pinpoint.rpc.codec.PacketEncoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ServerPacketDecoder(com.navercorp.pinpoint.rpc.codec.ServerPacketDecoder)

Aggregations

PacketEncoder (com.navercorp.pinpoint.rpc.codec.PacketEncoder)4 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)4 PacketDecoder (com.navercorp.pinpoint.rpc.codec.PacketDecoder)2 ServerPacketDecoder (com.navercorp.pinpoint.rpc.codec.ServerPacketDecoder)2 WriteTimeoutHandler (org.jboss.netty.handler.timeout.WriteTimeoutHandler)1