mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: ProtocolEncoder/Decoder v.s. MessageEncoder/Decoder
Date Tue, 31 Oct 2006 03:18:10 GMT
Hi Jian,

On 10/29/06, jian wu <hellojianwu@gmail.com> wrote:
> Mina provides two types of classes for encoding/decoding protocol data:
> ProtocolEncoder/ProtocolDecoder, and MessageEncoder/MessageDecoder.

MessageEncoder and MessageDecoder are assembled into ProtocolCodecFatory by
DemuxingProtocolCodecFactory.  The main difference is that

* ProtocolEncoder and Decoder transforms all messages for a protocol.
* MessageEncoder and Decoder transforms an individual message.

If you are implementing a complex protocol, I'd prefer
MessageEncoder/Decoder/DemuxingProtocolCodecFactory.  SumUp server is a good
example which uses DemuxingProtocolCodecFactory.

what we call human nature is actually human habit
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message