public class StringPipeLayer extends Object implements PipeDuplex<ByteBuf,String,String,ByteBuf>
StringDecoderHandler, StringEncoderHandler.
Please note that this decoder must be used with a proper ByteBuf to String
such as DelimiterBasedFrameHandler or LineBasedFrameHandler
if you are using a stream-based transport such as TCP/IP.
A typical setup for a text-based line protocol in a TCP/IP socket| 构造器和说明 |
|---|
StringPipeLayer()
Creates a new instance with the current system character set.
|
StringPipeLayer(Charset charset)
Creates a new instance with the specified character set.
|
| 限定符和类型 | 方法和说明 |
|---|---|
PipeStatus |
onMessage(PipeContext context,
boolean isRcv,
PipeRcvQueue<ByteBuf> rcvUp,
PipeSndQueue<String> rcvDown,
PipeRcvQueue<String> sndUp,
PipeSndQueue<ByteBuf> sndDown) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonActive, onClose, onError, onInitpublic StringPipeLayer()
public StringPipeLayer(Charset charset)
public PipeStatus onMessage(PipeContext context, boolean isRcv, PipeRcvQueue<ByteBuf> rcvUp, PipeSndQueue<String> rcvDown, PipeRcvQueue<String> sndUp, PipeSndQueue<ByteBuf> sndDown)
Copyright © 2022–2024. All rights reserved.