{{Short description|API for a third party}} '''Service provider interface''' ('''SPI''') is an API intended to be implemented or extended by a third party. It can be used to enable framework extension and replaceable components.<ref name=serviceoracle>{{cite web|title=Introduction to the Service Provider Interfaces|url=http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html|publisher=Oracle Java Documentation|quote=''Services are units of sound-handling functionality that are automatically available when an application program makes use of an implementation of the Java Sound API''}}</ref><ref name="thakur">{{cite web |author=Thribhuvan Thakur |date=November 18, 2009 |title=Service Provider Interface: Creating Extensible Java Applications |url=http://www.developer.com/java/article.php/3848881/Service-Provider-Interface-Creating-Extensible-Java-Applications.htm |url-status=dead |publisher=Developer.com |quote=''A service provider interface (SPI) is the set of public interfaces and abstract classes that a service defines. A SPI may be represented by a single interface (type) or abstract class or a set of interfaces or abstract classes that define the service contract''. |access-date=August 20, 2010 |archive-date=November 22, 2009 |archive-url=https://web.archive.org/web/20091122204057/http://www.developer.com/java/article.php/3848881/Service-Provider-Interface-Creating-Extensible-Java-Applications.htm }}</ref><ref>{{cite web|author1=Seacord, C. Robert |author2=Wrage, Lutz |name-list-style=amp |title=Replaceable Components and the Service Provider Interface|url=http://resources.sei.cmu.edu/library/asset-view.cfm?assetid=5901|publisher=Software Engineering Institute (CMU)|date=July 2002}}</ref>
==Details== From Java documentation: {{quotation|A service is a well-known set of interfaces and (usually abstract) classes. A service provider is a specific implementation of a service. The classes in a provider typically implement the interfaces and subclass the classes defined in the service itself. Service providers can be installed in an implementation of the Java platform in the form of extensions, that is, jar files placed into any of the usual extension directories. Providers can also be made available by adding them to the application's class path or by some other platform-specific means.<ref>{{cite web|title=ServiceLoader|url=http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html}}</ref>}}
The concept can be extended to other platforms using the corresponding tools. In the Java Runtime Environment, SPIs are used in:<ref name=serviceoracle/><ref name=thakur/>
*Java Database Connectivity *Java Cryptography Extension *Java Naming and Directory Interface *Java API for XML Processing *Java Business Integration *Java Sound *Java Image I/O *Java File Systems
==See also== *Plug-in (computing) *Java (programming language) *Java (software platform)
==References== {{reflist}}
==External links== *[http://resources.sei.cmu.edu/asset_files/TechnicalNote/2002_004_001_13958.pdf Replaceable Components and the Service Provider Interface] (.pdf at The Software Engineering Institute CMU) *Official Java API documentation: [http://download.oracle.com/javase/4/docs/api/java/util/ServiceLoader.html java.util.class and [http://com/javase/4/docs/api/java/util/spi/package-estary.html java.util.spi] package {{Java (Sun)}}
Category:Technical communication Category:Application programming interfaces {{prog-lang-stub}}