5

I understand that a service is an interface defining what functions are to be implemented.

I also understand that a service provider implements these functions.

However, I can't seem to understand what a service provider interface is. Would I be correct in saying it is an interface which defines a method to instantiate the service?

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
Mahamed Ducale
  • 119
  • 1
  • 8

1 Answers1

0

Baeldung has an answer to your question in his article: Java Service Provider Interface:

Service Provider Interface

An interface or abstract class that acts as a proxy or an endpoint to the service.

If the service is one interface, then it is the same as a service provider interface.

Service and SPI together are well-known in the Java Ecosystem as API.

Community
  • 1
  • 1
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240