Java: ServiceLoader in JDK 6
By admin on Nov 9, 2008 in Java, Programming
ServiceLoader is a class available in earlier version of Java and staring JDK 6, it is available formally under java.util package.
In JDK 6 – java.util.ServiceLoader
Prior to JDK 6 – Refer to the document at http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html
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.
Alternative for ServiceLoader, among other, are Commons Discovery, Google Guice, etc.
A good introduction to ServiceLoader can be found at http://www.javaspecialists.co.za/archive/newsletter.do?issue=139
Sorry, comments for this entry are closed at this time.