Re: Thoughts on EventManager & async posting

From: Holger Hoffstätte (holge..izards.de)
Date: Thu Nov 27 2003 - 13:08:06 EST

  • Next message: Andrus Adamchik: "Re: Thoughts on EventManager & async posting"

    Andrus Adamchik wrote:
    > > 1. Instead of postEvent(..) and postEvent(...,boolean), I suggest self
    > > explanatory "postNow", "postLater" methods.

    postLater..when exactly would that be? See how not having two methods
    would help? ;-)

    > > 2. Change "addListener" to throw a runtime exception instead of
    > > NoSuchMethodException. This will make the code cleaner. Currently I am

    Done, changed to RuntimeException(NSMEx.getMessage()). I removed the
    rather useless NSM checks for internal events and kept them for the unit
    test.

    > Also I'd like to change EventListener argument in 'addListener' to be
    > Object, since I am already running into trouble with that when using
    > Scope framework. Their listeners do not extend EventListener.

    Done - but just how ugly is this? I originally did it to be 'Java design
    compliant'..how foolish of me! Though I agree, generic Object is more
    practical..and just goes to show how useless that particular marker
    interface is in reality. Well, you could use AspectJ to tack it on.. :-)

    Holger



    This archive was generated by hypermail 2.0.0 : Thu Nov 27 2003 - 14:27:17 EST