understanding netty questions

Christian Migowski chrismfwrd at gmail.com
Wed Apr 29 10:13:37 EDT 2009


Hi,

is it correct that if I want to write a fully "Netty-compliant"
Handler that can be inserted at any position in a ChannelPipeline I do
have to have a ctx.sendUpstream(e) or ctx.sendDownstream(e) as last
instruction in my methods that are overriden from
SimpleChannelHandler (e.g. messageReceived or channelClosed) ?

If so, why isn't SimpleChannelHandler (and the single
Up/DownstreamHandler variants) implemented so it always calls
sendUp/Downstream after its long if/else decisions in the
handleUp/Downstream methods? I can understand that not always invoking
the sendUp/Downstream method enables handlers to "cut" the processing
in a pipeline, but is this really a useful feature (for what)?
Also, the various "event methods" invoked from handleUp/Downstream in
SimpleChannelHandler could be made abstract so most modern IDEs would
generate your Handler-class with all possible "extension methods" if
it extends SimpleChannelHandler and you wouldn't need to look in the
Javadoc to lookup the method name for an event because they are quite
obvious :)


regards,
christian!



More information about the netty-users mailing list