Content ChannelBuffer Factory for HTTP Codec?
Trustin Lee
tlee at redhat.com
Mon Dec 8 05:02:11 EST 2008
On Mon, Dec 08, 2008 at 06:48:59PM +0900, Trustin Lee wrote:
> Does this improvement satisfy your requirement?
>
> * https://jira.jboss.org/jira/browse/NETTY-96
>
> By setting the default buffer factory to your own implementation, you
> can decide what buffer type HttpMessageDecoder will use.
>
> However, it's somewhat different from your original suggestion; Netty
> uses the factory from the point where it allocates a receive buffer,
> which means your native buffer implementation will be used throughput
> the framework. If it's not what you expected, we could improve the
> design of the current ChannelBufferFactory interface.
Or you could use some sort of internal flag to tell your
ChannelBufferFactory implementation that it should create the special
buffer only when the flag is set. The flag could be stored as a
ThreadLocal and set to true before HttpMessageDecoder.decode() and set
to false after HttpMessageDecoder.decode().
--
Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat
--
what we call human nature in actuality is human habit
--
http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20081208/9796c40b/attachment.bin
More information about the netty-users
mailing list