Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of java.util.spi package?

I saw java.util.spi package and it seems like there are some classes suffixed with Name, Data, Control and Service Providers. Some of the classes where new(Since 1.8) and some where exist from Java 1.6. I don't find much resources to understand the usage of this spi package.

Is there anyone who uses these classes in spi package? If so could you please let me know what exactly these classes are used for?

like image 766
ashokramcse Avatar asked Oct 27 '25 04:10

ashokramcse


1 Answers

This package contains SPI providers for some classes in java.util package. SPI stands for Service Provider Interface and it's a standard Java way to plugin additional functionality as a service discovery mechanism - You can read more about it here SPI basics. Some good details are also available under this question: difference-between-spi-and-api

like image 105
kaos Avatar answered Oct 29 '25 19:10

kaos