mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ulrich (proemion)" <steve.ulr...@proemion.com>
Subject Re: final AbstractIoSession
Date Thu, 06 Dec 2007 12:07:55 GMT

Hi Trustin


Trustin Lee wrote:
> 
> I thought about this issue again and again every night (OK, I'm
> exaggerating) and realized what you want to do (overriding
> AbstractIoSession.write()) can be done alternatively by adding a
> filter that intercepts the write call.  Does it fulfill your needs?
> 
hmm... somehow.
I did it this way now, but in my opinion it's not the best possible
solution. As I wrote before, I'm working on a test class which is testing my
handler class. As far as I understand the unit test sight of things, I
should mock up nearly everything I give to the tested method. This way I can
evaluate what the method is doing, without giving any attention to the
environment. That's why I wanted to override/mock the write method. But I'm
not interested in everything, ie. get/setAttributes.



> I also would like to emphasis again that making concrete methods final
> in an abstract class is good for maintenance because it doesn't lead
> the subclasses to weird behaviors at least.
> 

Maybe there are some points where final statements helps to understand
things. Maybe my intention is not a usual thing and/or I misunderstood
something. I just wanted to make sure, that this is well thought and point
out some possible problems.
There are no other people crying and you spend some nights over it now and
have no doubt about that change, so I think that will be ok.

regards and thanks from Germany

Steve

-- 
View this message in context: http://www.nabble.com/final-AbstractIoSession-tf4889613s16868.html#a14191004
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Mime
View raw message