Almost finish javadocs for codec module
This commit is contained in:
parent
b814033323
commit
ff3dcffd49
@ -20,6 +20,7 @@ import io.netty.buffer.ByteBufInputStream;
|
||||
import io.netty.channel.ChannelHandler.Sharable;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
|
||||
import io.netty.handler.codec.LengthFieldPrepender;
|
||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||
@ -32,7 +33,7 @@ import com.google.protobuf.MessageLite;
|
||||
* Decodes a received {@link ByteBuf} into a
|
||||
* <a href="http://code.google.com/p/protobuf/">Google Protocol Buffers</a>
|
||||
* {@link Message} and {@link MessageLite}. Please note that this decoder must
|
||||
* be used with a proper {@link FrameDecoder} such as {@link ProtobufVarint32FrameDecoder}
|
||||
* be used with a proper {@link ByteToMessageDecoder} such as {@link ProtobufVarint32FrameDecoder}
|
||||
* or {@link LengthFieldBasedFrameDecoder} if you are using a stream-based
|
||||
* transport such as TCP/IP. A typical setup for TCP/IP would be:
|
||||
* <pre>
|
||||
@ -51,8 +52,7 @@ import com.google.protobuf.MessageLite;
|
||||
* and then you can use a {@code MyMessage} instead of a {@link ByteBuf}
|
||||
* as a message:
|
||||
* <pre>
|
||||
* void messageReceived({@link ChannelHandlerContext} ctx, {@link MessageEvent} e) {
|
||||
* MyMessage req = (MyMessage) e.getMessage();
|
||||
* void messageReceived({@link ChannelHandlerContext} ctx, MyMessage req) {
|
||||
* MyMessage res = MyMessage.newBuilder().setText(
|
||||
* "Did you say '" + req.getText() + "'?").build();
|
||||
* ch.write(res);
|
||||
|
@ -47,8 +47,7 @@ import com.google.protobuf.MessageLite;
|
||||
* and then you can use a {@code MyMessage} instead of a {@link ByteBuf}
|
||||
* as a message:
|
||||
* <pre>
|
||||
* void messageReceived({@link ChannelHandlerContext} ctx, {@link MessageEvent} e) {
|
||||
* MyMessage req = (MyMessage) e.getMessage();
|
||||
* void messageReceived({@link ChannelHandlerContext} ctx, MyMessage req) {
|
||||
* MyMessage res = MyMessage.newBuilder().setText(
|
||||
* "Did you say '" + req.getText() + "'?").build();
|
||||
* ch.write(res);
|
||||
|
Loading…
Reference in New Issue
Block a user