public abstract class OneToOneDecoder extends Object implements ChannelUpstreamHandler
FrameDecoder
such as
DelimiterBasedFrameDecoder
if you are using a stream-based transport
such as TCP/IP. A typical setup for TCP/IP would be:
ChannelPipeline
pipeline = ...; // Decoders pipeline.addLast("frameDecoder", newDelimiterBasedFrameDecoder
(80,Delimiters.nulDelimiter()
)); pipeline.addLast("customDecoder", newOneToOneDecoder
() { ... }); // Encoder pipeline.addLast("customEncoder", newOneToOneEncoder
() { ... });
Modifier | Constructor and Description |
---|---|
protected |
OneToOneDecoder()
Creates a new instance with the current system character set.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
decode(ChannelHandlerContext ctx,
Channel channel,
Object msg) |
void |
handleUpstream(ChannelHandlerContext ctx,
ChannelEvent evt)
Handles the specified upstream event.
|
protected OneToOneDecoder()
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception
ChannelUpstreamHandler
handleUpstream
in interface ChannelUpstreamHandler
ctx
- the context object for this handlerevt
- the upstream event to process or interceptException
Copyright © 2008–2013 JBoss, by Red Hat. All rights reserved.