Jump to content

Service provider interface: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
ZéroBot (talk | contribs)
m r2.7.1) (robot Adding: ca:Service Provider Interface
clarifying that an SPI is a special case of an API
Line 1: Line 1:
{{Notability|date=September 2009}}
{{Notability|date=September 2009}}
'''Service Provider Interface''' (SPI) is a software mechanism to support replaceable components.
'''Service Provider Interface''' (SPI) is an [[Application programming interface|API]] intended to be implemented or extended by a third party. It can be used to enable framework extension and replaceable components.

It is the implementer-side equivalent of an [[Application programming interface|API]]; a set of hooks that can or must be overridden.


From Java official documentation: "''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.''"
From Java official documentation: "''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.''"

Revision as of 22:51, 11 October 2012

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.

From Java official documentation: "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."

The concept can be easily extended to any other platform using the corresponding tools.

In the Java Runtime Environment, SPIs are used in JDBC, JCE, JNDI, JAXP, JBI, Java Sound and Java Image I/O.

See also