public class PlainTextMessageCodec extends Object implements MessageCodec
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
PlainTextMessageCodec.BufferHelper |
static class |
PlainTextMessageCodec.Context |
protected static class |
PlainTextMessageCodec.DateHelper
Thread safe date helper class.
|
protected static class |
PlainTextMessageCodec.Policy |
| 构造器和说明 |
|---|
PlainTextMessageCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
MessageTree |
decode(io.netty.buffer.ByteBuf buf)
decode buf to message tree
first 4 bytes is the length of message tree
|
protected void |
decodeHeader(PlainTextMessageCodec.Context ctx,
MessageTree tree) |
protected Message |
decodeLine(PlainTextMessageCodec.Context ctx,
DefaultTransaction parent,
Stack<DefaultTransaction> stack,
MessageTree tree) |
protected void |
decodeMessage(PlainTextMessageCodec.Context ctx,
MessageTree tree) |
io.netty.buffer.ByteBuf |
encode(MessageTree tree)
encode message tree to buf
|
protected int |
encodeHeader(MessageTree tree,
io.netty.buffer.ByteBuf buf) |
protected int |
encodeLine(Message message,
io.netty.buffer.ByteBuf buf,
char type,
PlainTextMessageCodec.Policy policy) |
int |
encodeMessage(Message message,
io.netty.buffer.ByteBuf buf) |
static String |
encodeTree(MessageTree tree) |
void |
reset() |
protected void |
setBufferWriter(BufferWriter writer) |
public static String encodeTree(MessageTree tree)
public MessageTree decode(io.netty.buffer.ByteBuf buf)
MessageCodecdecode 在接口中 MessageCodecprotected void decodeHeader(PlainTextMessageCodec.Context ctx, MessageTree tree)
protected Message decodeLine(PlainTextMessageCodec.Context ctx, DefaultTransaction parent, Stack<DefaultTransaction> stack, MessageTree tree)
protected void decodeMessage(PlainTextMessageCodec.Context ctx, MessageTree tree)
public io.netty.buffer.ByteBuf encode(MessageTree tree)
MessageCodecencode 在接口中 MessageCodecprotected int encodeHeader(MessageTree tree, io.netty.buffer.ByteBuf buf)
protected int encodeLine(Message message, io.netty.buffer.ByteBuf buf, char type, PlainTextMessageCodec.Policy policy)
public int encodeMessage(Message message, io.netty.buffer.ByteBuf buf)
public void reset()
reset 在接口中 MessageCodecprotected void setBufferWriter(BufferWriter writer)
Copyright © 2022. All rights reserved.