I understand that encoding/decoding can be optional but I think that in some cases they can help to simplify the code. For example, in the last days I developed a tcp server (using ProtocolHandler) that read ReadMessage objects and write WriteMessage objects. Hence I wrote a TcpProtocolEncoder that trasform WriteMessage to ByteBuffer and a TcpProtocolDecoder that trasform ByteBuffer to ReadMessage. Now I would like to add the vm pipe transport type support to the same server but because I can't use encoding/decoding, MINA call ProtocolHandler.messageReceived() with a message of type WriteMessage. So when receiving messages from a vm pipe client the messageReceived() should first trasform the WriteMessage in a ReadMessage.
Hence the messageReceived() code depends on the session trasport type.

My question is: is there a design flaw in my project or I missed something in the use of vm pipe trasport type?

Paolo

Jose Alberto Fernandez ha scritto:

There is no serialization necessary when doing things in memory; hence
encoding/decoding is not needed.

Jose

-----Original Message-----
From: Paolo Perrucci [mailto:[EMAIL PROTECTED]
Sent: 17 October 2005 16:49
To: [email protected]
Subject: Protocol decoder for vm pipe session

Hi all,

it seems that vm pipe based protocol session doesn't use protocol
endoder and decoder. Indeed ProtocolSession.getEncoder() return null.
Is this a bug or a feature ?

Thanks
Paolo

Reply via email to