Netty codecs have "protected" method preventing easy reuse outside pipeline

"이희승 (Trustin Lee)" trustin at gmail.com
Thu May 19 09:46:32 EDT 2011


I think it's not a good idea to change the visibility of the API in 3
because it will probably break other people's code if they extended the
stock codecs.

However, in Netty 4, we could find a better way to expose the encode
method to a user.  As you said, many encoders does not access
ChannelHandlerContext at all, so it's a good candidate for API redesign.

HTH
Trustin

On 05/19/2011 10:34 PM, Abraham Menacherry wrote:
> Christian,
> 
> Thanks for quick reply. I am not very clear with the answer, do you mean
> that I should subclass each codec? If so, I am planning to use a number of
> codec's from Netty, not just StringEncoder/Decoder and sub classing each one
> just because of this "protected" looks a bit of overkill to me. Did you mean
> something else? Could you provide an example?
> 
> I am assuming that this change is actually trivial to the api, since the
> move is from protected to public, it shouldn't break anything.
> 
> Thanks,
> Abraham.
> 
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-codecs-have-protected-method-preventing-easy-reuse-outside-pipeline-tp6380824p6381957.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users


-- 
Trustin Lee, http://gleamynode.net/


More information about the netty-users mailing list