© Kishori Sharan 2017

Kishori Sharan, Java 9 Revealed, 10.1007/978-1-4842-2592-9_5

5. Implementing Services

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • What services, service interfaces, and service providers are

  • How to implement a service in JDK 9 and before JDK 9

  • 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 modules loads using the ServiceLoader class

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

  • How to discover, filter, and select service providers based on their class without ...

Get Java 9 Revealed: For Early Adoption and Migration 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.