You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by El...@sita.aero on 2006/08/01 16:36:33 UTC

simple protocol codec factory question

Thank you for the reply on my last question, I have it sorted out now. I 
have another question, however, now. I was looking at the May 9, 2006 
thread titled "Some questions about the DemuxingProtocolCodecFactory" and 
I noticed that the order of the encoder/decoder pair was swapped in the 
ProtocolCodecFactory's. My question: Does the order in which the decoder & 
encoder are registered in the ProtocolCodecFactory matter? That is, is
ProtocolCodecFactory_1
        encoder1
        decoder1
equivalent to
ProtocolCodecFactory_1
        decoder1
        encoder1

Thank you for your help.

Best regards,

Elizabeth Clause
Email: elizabeth.clause@sita.aero

Re: simple protocol codec factory question

Posted by Trustin Lee <tr...@gmail.com>.
On 8/1/06, Elizabeth.Clause@sita.aero <El...@sita.aero> wrote:
>
> Thank you for the reply on my last question, I have it sorted out now. I
> have another question, however, now. I was looking at the May 9, 2006
> thread titled "Some questions about the DemuxingProtocolCodecFactory" and
> I noticed that the order of the encoder/decoder pair was swapped in the
> ProtocolCodecFactory's. My question: Does the order in which the decoder &
> encoder are registered in the ProtocolCodecFactory matter? That is, is
> ProtocolCodecFactory_1
>         encoder1
>         decoder1
> equivalent to
> ProtocolCodecFactory_1
>         decoder1
>         encoder1


It doesn't matter at all as long as you add the ProtocolCodecFilter with
your protocol codec before any I/O happens.  If you added the filter before
binding the handler, then it's absolutely OK.

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