> Never heard of this, references?
Here are the Java 6 docs: ServiceLoader 
(http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html)
> Would the only advantage be a step forward towards Android?
> 
> 

Well our current technique is rather unsupported :-)

But yeah I am not sure Service Provider Interface is a good way to go, we would 
need to transition to ServiceLoader in order to work on Andriod, and we have 
never managed to make it work very well for Eclipse applications (or other 
environments that lock things down with class loaders).

We outlined how to do the same trick we did with logging a while back, but it 
is one of these "massive asks" that never will get funding.

To make this a viable sprint target we would need:

1. Our own replacement for ServiceRegistry to handle caching/reuse
2. Just focus ServiceLoader (or equivalent ) on hunting down classes
3. A working proof of concept we are happy with

And then during the sprint we would:

4. Update our FactoryFinders and test test test ...

Most of the codebase is straightforward, but referencing plays weird and 
wonderful tricks.
Think we would have to split some of these classes into:
- SomeServiceProvider - implementation contributed by a plugin
- SomeService - entry to cache for reuse


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to