Re: Codecs and CumulativeByteBuffer

2013-06-17 Thread Raphaël Barazzutti
Hi Emmanuel, Thanks for your comments! I imagine that slice() method would have a behaviour similar to the one of ByteBuffer. As in ByteBuffer, position based values (position, limit and mark) of the slice would be independent copies of the original IoBuffer ones, but the buffer content itself

Re: Codecs and CumulativeByteBuffer

2013-06-17 Thread Emmanuel Lécharny
Le 6/17/13 1:32 PM, Raphaël Barazzutti a écrit : Hi Emmanuel, Thanks for your comments! I imagine that slice() method would have a behaviour similar to the one of ByteBuffer. As in ByteBuffer, position based values (position, limit and mark) of the slice would be independent copies of the

Re: Codecs and CumulativeByteBuffer

2013-06-17 Thread Emmanuel Lécharny
Le 6/17/13 1:47 PM, Emmanuel Lécharny a écrit : Le 6/17/13 1:32 PM, Raphaël Barazzutti a écrit : Hi Emmanuel, Thanks for your comments! I imagine that slice() method would have a behaviour similar to the one of ByteBuffer. As in ByteBuffer, position based values (position, limit and mark)

Re: Codecs and CumulativeByteBuffer

2013-06-17 Thread Raphaël Barazzutti
Hi Emmanuel, Thanks for your helpful comments, I think that I've now a better picture of how you expect things to work with IoBuffer. For sure IoBuffer is per session and not shared. But more specifically, I see that a the context should be an object pointing to IoBuffer and not an IoBuffer

Re: Codecs and CumulativeByteBuffer

2013-06-16 Thread Raphaël Barazzutti
Hi Julien, Thanks for your comments! You're right there are not that much differences between that two classes. In some situations I find IoBuffer very interesting, but in the case of a decoder there are some concepts taken from ByteBuffer that in my opinion don't fit very well. Lets describe

Re: Codecs and CumulativeByteBuffer

2013-06-16 Thread Emmanuel Lécharny
Le 6/16/13 9:31 PM, Raphaël Barazzutti a écrit : Hi Julien, Thanks for your comments! You're right there are not that much differences between that two classes. In some situations I find IoBuffer very interesting, but in the case of a decoder there are some concepts taken from ByteBuffer

Codecs and CumulativeByteBuffer

2013-06-15 Thread Raphaël Barazzutti
Hi all, According to the helpful comment of Ashish (thanks!), I had to add a cumulative mechanism in codec in order to have correct unserialization in the Thrift module as well as in the Protobuf module. Look here : https://github.com/rbarazzutti/mina.git on branch serialization-fixes-1 For

Re: Codecs and CumulativeByteBuffer

2013-06-15 Thread Julien Vermillard
Hi, Thanks for the contribution ! keep up the good work. The CumulativeDecoder is a nice addition for the ones who will miss the old one and more in phase with the new codec API. On the CumulativeByteBuffer, it's not that far of IoBuffer I don't think we should have two class and they should