1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.mimo.netty.example.icap.preview;
15
16 import static org.jboss.netty.channel.Channels.pipeline;
17
18 import org.jboss.netty.channel.ChannelPipeline;
19 import org.jboss.netty.channel.ChannelPipelineFactory;
20
21 import ch.mimo.netty.handler.codec.icap.IcapRequestDecoder;
22 import ch.mimo.netty.handler.codec.icap.IcapResponseEncoder;
23
24 public class IcapServerChannelPipeline implements ChannelPipelineFactory {
25
26 @Override
27 public ChannelPipeline getPipeline() throws Exception {
28 ChannelPipeline pipeline = pipeline();
29 pipeline.addLast("decoder",new IcapRequestDecoder());
30 pipeline.addLast("encoder",new IcapResponseEncoder());
31 pipeline.addLast("handler",new IcapServerHandler());
32 return pipeline;
33 }
34
35 }