RFR: JDK-8304439: Subscription based listeners [v7]
John Hendrikx
jhendrikx at openjdk.org
Tue Jul 11 21:04:48 UTC 2023
On Mon, 10 Jul 2023 08:15:54 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Thanks for the clarifications.
>> If I get it right, you talk about `invalidation subscriber` for `subscribe(Runnable)` API, `value subscriber` for `subscribe(Consumer)` API and `change subscriber` for `subscribe(BiConsumer)` API, and that's fine, but for a developer that approaches this new API, there is no indication of that (API naming, javadoc), so that's why I'm a little bit concerned about this different in behaviour of the value vs change subscribers.
>>
>> As commented before, probably the javadoc for the three `subscribe` methods should be extended a little bit more with a mention of the listener involved, and with a small sample.
>
> Yes, it's true they map like that: Runnable -> invalidations, Consumer -> values, BiConsumer -> changes. I will extend the docs as this indeed is a bit unclear now (the methods were called "invalidations", "values" and "changes" before).
I've updated the docs, and also renamed the parameters from `subscriber` to `xxxSubscriber` so it is more clear even without reading the docs.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1069#discussion_r1260273704
More information about the openjfx-dev
mailing list