Service Provider mechanism and javax.imageio.spi.ServiceRegistry
Bertrand Delacretaz <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
Hi, Looking for a lightweight plugin mechanism I stumbled on the jar service provider spec [1]. The example there contains Iterator ps = Service.providers(CharCodec.class); Without indicating what the "Service" class is. The javax.imageio.spi.ServiceRegistry [2] can be used to load services using this mechanism, and it's part of the JDK API so using it as a general-purpose utility should be ok. But it feels a bit weird to have this in javax.imageio.spi, is there a better alternative? -Bertrand [1] http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Service%20Provider [2] http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/spi/ServiceRegistry.html =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com