RFR: JDK-8304439: Subscription based listeners [v2]

John Hendrikx jhendrikx at openjdk.org
Thu Jun 29 22:22:01 UTC 2023


On Wed, 28 Jun 2023 15:05:24 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>>> My suggestion is to have the following new operations:
>>> 
>>> * `subscribe` (`Runnable`, `Consumer`, `BiConsumer`)
>> 
>> This seems reasonable. I could be talked into the longer names, but I prefer the overloaded `subscribe` name.
>> 
>>> * `subscribeListener` (`InvalidationListener`, `ChangeListener`)
>> 
>> This might be a useful follow-on Enhancement, but I wouldn't do it as part of this one.
>
> I prefer short names here as often there will be a lambda or method reference following it that makes it clear what you're doing, so I guess that's a vote for `subscribe` plus overrides then.

I've updated this PR now to use the `subscribe` naming, and created a corresponding CSR.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1069#discussion_r1247224808


More information about the openjfx-dev mailing list