Difficult reusability of handlers

Martin Ždila m.zdila at gmail.com
Mon Jun 6 10:03:46 EDT 2011


Hello

I am having hard times to reuse existing ChannelHandler
implementations. For example I want to have following pipeline:

MyHttpAccessLogger
HttpRequestDecoder
HttpContentDecompressor
MyHttpResponseEncoder
HttpContentCompressor
MyHttpResponseHandler

MyHttpResponseHandler writes MyHttpResponse containing both
HttpRequest and HttpResponse which are needed for MyHttpAccessLogger.
MyHttpResponse unfortunately doesn't extend HttpResponse and so it
can't be handled by HttpContentCompressor.

This is only an example. There are many different use-cases where
custom message object must be passed and standard implementations
don't understand it. Is it a design feature or have I missed
something? Do you have any recommendation how to solve such problem?

Thanks in advance

Best regards
-- 
Ing. Martin Ždila
tel:+421-908-363-848
mailto:martin at zdila.sk
http://www.zdila.sk/



More information about the netty-users mailing list