On Jul 3, 2006, at 12:19 PM, Paul Mallach wrote:
I'm currently porting an application from MINA 0.8.4 to the current versionand have got a small question about filters:I want to queue multiple filters, so that each filter handles a different part of the encoding/decoding process. I don't want to pass ByteBuffers betweenthese filters, but my own Message-Objects, i.e.: MyHandler (only deal with my custom messages) ^ v Custom messages MyFilter (decodes Strings into my custom messages, encodes my custom messages into Strings) ^ v Strings TextLineDecoder/TextLineEncode (ByteBuffer <=> String) ^ v More MINABut this doesn't seem to be possible, as ProtocolDecoder and ProtocolEncoderreceive ByteBuffers in their decode/encode methods and not Objects.
Its totally possible. The ProtocolEncoder / ProtocolDecoder are part of the ProtocolCodecFilter, which you don't have listed in your example chain above. You should be fine.
I think I should use the new ChainedIoHandler instead of stacking multiple Filters. Is thtat true? Are there any examples for the recommended way to dothis?
I'd recommend using IoFilter's -pete -- [EMAIL PROTECTED] - http://fotap.org/~osi
smime.p7s
Description: S/MIME cryptographic signature
