April 2018
Intermediate to advanced
246 pages
6h 11m
English
A service is a bunch of interfaces and classes collectively named a library, which delivers a specific functionality. Simply, we can say API. There are multiple usages for a service and they are called service providers (say implementations) . The client utilizing this service will not have any contact with the implementations. This can be accomplished by utilizing the underneath concept.
Java has ClassLoader, which simply loads the classes and creates instances of classes on runtime. Compared to Java 9 modules, java.util.ServiceLoader is capable of finding and loading all the service providers at a runtime for a service interface. The ServiceLoader class permits decoupling between the API and client app. The service ...