I have many Message classes that implements MessageDecoder and
MessageEncoder, and they are all listed in a DemuxingProtocolCodecFactory.
Now I need to be able to choose what decoder/encoder to use just depending
on the second byte (opcode) I receive; I could implement a decodable() for
each Message returning OK if the byte is right but it's slow with many
Messages! I need to do something like this:

switch(opCodeByte){
  case 0x01: use HelloMessageDecoder
  case 0x02: use DataMessageDecoder
 ...
}

Maybe DemuxingIoHandler is the right way but there is no doc about, could
you help me ?
Thanks for your work and your beautiful framework!

-- 
View this message in context: 
http://www.nabble.com/Many-message-decoder-encoder-tf4776815s16868.html#a13664414
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to