Search in sources :

Example 16 with ChannelPipeline

use of org.jboss.netty.channel.ChannelPipeline in project pinpoint by naver.

the class ServerPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("decoder", new PacketDecoder());
    pipeline.addLast("encoder", new PacketEncoder());
    pipeline.addLast("handler", pinpointServerChannelHandler);
    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 17 with ChannelPipeline

use of org.jboss.netty.channel.ChannelPipeline 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 18 with ChannelPipeline

use of org.jboss.netty.channel.ChannelPipeline in project neo4j by neo4j.

the class Server method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("monitor", new MonitorChannelHandler(byteCounterMonitor));
    addLengthFieldPipes(pipeline, frameLength);
    pipeline.addLast("serverHandler", this);
    return pipeline;
}
Also used : ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 19 with ChannelPipeline

use of org.jboss.netty.channel.ChannelPipeline in project jstorm by alibaba.

the class StormClientPipelineFactory method getPipeline.

public ChannelPipeline getPipeline() throws Exception {
    // Create a default pipeline implementation.
    ChannelPipeline pipeline = Channels.pipeline();
    // Decoder
    pipeline.addLast("decoder", new MessageDecoder(false, conf));
    // Encoder
    pipeline.addLast("encoder", new MessageEncoder());
    // business logic.
    pipeline.addLast("handler", new StormClientHandler(client));
    return pipeline;
}
Also used : ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 20 with ChannelPipeline

use of org.jboss.netty.channel.ChannelPipeline in project jstorm by alibaba.

the class StormServerPipelineFactory method getPipeline.

public ChannelPipeline getPipeline() throws Exception {
    // Create a default pipeline implementation.
    ChannelPipeline pipeline = Channels.pipeline();
    // Decoder
    pipeline.addLast("decoder", new MessageDecoder(true, conf));
    // Encoder
    pipeline.addLast("encoder", new MessageEncoder());
    // business logic.
    pipeline.addLast("handler", new StormServerHandler(server));
    return pipeline;
}
Also used : ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Aggregations

ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)105 InetSocketAddress (java.net.InetSocketAddress)32 ChannelPipelineFactory (org.jboss.netty.channel.ChannelPipelineFactory)29 SimpleObjectCaptureHandler (com.linkedin.databus2.test.container.SimpleObjectCaptureHandler)24 Channel (org.jboss.netty.channel.Channel)23 SocketAddress (java.net.SocketAddress)20 SimpleTestServerConnection (com.linkedin.databus2.test.container.SimpleTestServerConnection)17 ChannelBuffer (org.jboss.netty.buffer.ChannelBuffer)16 DefaultHttpResponse (org.jboss.netty.handler.codec.http.DefaultHttpResponse)15 HttpRequest (org.jboss.netty.handler.codec.http.HttpRequest)15 HttpResponse (org.jboss.netty.handler.codec.http.HttpResponse)15 ServerBootstrap (org.jboss.netty.bootstrap.ServerBootstrap)13 HttpResponseEncoder (org.jboss.netty.handler.codec.http.HttpResponseEncoder)13 LoggingHandler (org.jboss.netty.handler.logging.LoggingHandler)13 Checkpoint (com.linkedin.databus.core.Checkpoint)12 HttpRequestDecoder (org.jboss.netty.handler.codec.http.HttpRequestDecoder)12 ConditionCheck (com.linkedin.databus2.test.ConditionCheck)11 NioServerSocketChannelFactory (org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory)11 Test (org.testng.annotations.Test)11 DbusEventBuffer (com.linkedin.databus.core.DbusEventBuffer)10