Module Layers and platform architectures
Alan Bateman
alan.bateman at oracle.com
Fri Dec 20 13:52:26 UTC 2024
On 19/12/2024 20:54, David Lloyd wrote:
> I wonder: would this also allow services to be found across the layer
> boundaries? For example, an API from a layer that the application can
> see uses a service provided by an implementation in a layer that the
> application cannot see?
Service loading is specified to work across module layers. Code in a
child layer might invoke ServiceLodaer to locate providers in its own
and parent layer, assuming the service is in the parent layer. Code in
the parent layer might invoke ServiceLoader to locate providers in the
child layer. If everyone were in the same room in front of a white board
then this would be easy to draw.
An important point about service providers is that they be fully
encapsulated. So while many modules can "see" the service provider
module, where "see" means visibility, then nobody can access.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20241220/4e854635/attachment-0001.htm>
More information about the jigsaw-dev
mailing list