Re: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread David Holmes
On 24/11/2020 4:46 pm, Alex Orlov wrote: Could you then explain the difference between service and service provider? As I understand you’re saying they are the same. I always thought, that they were two different things. For example, They are two different things and I'm certainly not saying t

Re: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread David Holmes
On 23/11/2020 6:28 pm, Alex Orlov wrote: > The method does return a "provider". It returns the object that is an > instance of a class that provides the service - hence that object is a > provider. I don’t agree with that. It returns the object that is an instance of the service. And that o

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread Alex Orlov
To tell the truth I didn’t use ServiceLoader.Provider. Please, consider the following code:   module msg.service.provider.swing {    ..    provides service.api.AService with service.provider.TheServiceProvider;    ... }   ... public class TheServiceProvider {         public static AService pr

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread Alex Orlov
> The method does return a "provider". It returns the object that is an > instance of a class that provides the service - hence that object is a > provider.   I don’t agree with that. It returns the object that is an instance of the service.     -- Best regards, Alex Orlov     >Понедельник, 23 н

Re: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread Alan Bateman
On 23/11/2020 08:28, Alex Orlov wrote: I don’t agree with that. It returns the object that is an instance of the service. The method returns an instance of the service provider. The enhancements to ServiceLoader in Java 9 were tracked as #ServiceLoaderEnhancements [1], the link to "Propos