I don't follow: Mina codecs process IOBuffer which is Mina specific.
If you want to made codec independent you should used reader/writer or
streams, then you loose Mina power.

Arnaud.

2012/12/12 Julien Vermillard <[email protected]>:
> IMO It's a good idea to provide a codec framework really independent of the
> transport code. To be further thought..
>
>
> On Wed, Dec 12, 2012 at 8:31 AM, Emmanuel Lécharny <[email protected]>wrote:
>
>> Le 12/12/12 12:44 AM, Hiller, Dean a écrit :
>> > I need re-usable async http parsing code. Does mina perhaps contain some
>> api for just the parsing portion? (I always have a belief that parsers
>> should be separate and re-usable and not tied to the framework so I hope
>> mina's is reusable as well).
>>
>> You can have a look at the HttpDecoder class, in the http module
>> (
>> http://svn.apache.org/viewvc/mina/mina/tags/2.0.7/mina-http/src/main/java/org/apache/mina/http/
>> ).
>>
>> It expects to get a session as a parameter, but the session is basically
>> just used to store a state, allowing the parser to stop and restart when
>> more bytes are received. You can most certainly replace the session by a
>> Map or any other data structure storing the current state.
>>
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>>

Reply via email to