org.jboss.netty.handler.codec.frame.FrameDecoder Java Examples

The following examples show how to use org.jboss.netty.handler.codec.frame.FrameDecoder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CarbonTextServer.java    From kairos-carbon with Apache License 2.0 6 votes vote down vote up
@Override
public ChannelPipeline getPipeline() throws Exception
{
	ChannelPipeline pipeline = Channels.pipeline();

	// Add the text line codec combination first,
	FrameDecoder frameDecoder = new LineBasedFrameDecoder(
			m_maxSize, true, true);

	pipeline.addLast("framer", frameDecoder);
	pipeline.addLast("decoder", new WordSplitter());
	pipeline.addLast("encoder", new StringEncoder());

	// and then business logic.
	pipeline.addLast("handler", this);

	return pipeline;
}
 
Example #2
Source File: RpcUtil.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public static FrameDecoder constructRpcFrameDecoder() {
  return new RpcFrameDecoder();
}
 
Example #3
Source File: RpcUtil.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static FrameDecoder constructRpcFrameDecoder() {
  return new RpcFrameDecoder();
}