© Kishori Sharan, Peter Späth 2021
K. Sharan, P. SpäthMore Java 17 https://doi.org/10.1007/978-1-4842-7135-3_7

7. Implementing Services

Kishori Sharan1   and Peter Späth2
(1)
Montgomery, AL, USA
(2)
Leipzig, Sachsen, Germany
 
In this chapter, you will learn:
  • What services, service interfaces, and service providers are

  • How to implement a service in Java

  • How to use a Java interface as a service implementation

  • How to load service providers using the ServiceLoader class

  • How to use the uses statement in a module declaration to specify the service interface that the current module discovers and loads using the ServiceLoader class

  • How to use the provides statement to specify a service provider provided by the current module

  • How to discover, filter, and select service ...

Get More Java 17: An In-Depth Exploration of the Java Language and Its Features now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.