Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.tyluur.network;
- import org.jboss.netty.channel.ChannelPipeline;
- import org.jboss.netty.channel.ChannelPipelineFactory;
- import org.jboss.netty.channel.Channels;
- import com.tyluur.network.decoders.ClientDecoder;
- public final class SevadorPipeline implements ChannelPipelineFactory {
- /**
- * The instance of the handler which will be handling packets.
- */
- private static final String HANDLER = "handler",
- /**
- * The instance of the decoder which will be decoding packets sent to the server.
- */
- DECODER = "decoder",
- /**
- * The instance of the encoder - task is to encode packets
- */
- ENCODER = "encoder";
- @Override
- public ChannelPipeline getPipeline() throws Exception {
- ChannelPipeline pipeline = Channels.pipeline();
- pipeline.addLast(DECODER, new ClientDecoder());
- pipeline.addLast(HANDLER, new SevadorHandler());
- return pipeline;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement