Hi Everyone,

We have a pull request for the jdbc resource store (as well as some 
additional resources port commits )
See https://github.com/geoserver/geoserver/pull/1361

It has been fully reviewed by Ben, but there is some new resources 
related stuff added to the platform module that I wanted to check with 
the community as well.

1) There is kind of some new API, but it is completely separate from the 
existing API (and does not alter any existing API in any way): the 
ResourceWatcher interface with SimpleResourceWatcher implementation.
See this commit: 
https://github.com/NielsCharlier/geoserver/commit/3d36223546bea462d972e931152dc07a2b5039e7

This is an interface/class that, completely separately from the file 
system (hence it is not used by the default resource store 
implementations) store resource listeners, receives resource 
notifications and sends these to the listeners. The interface allows us 
to implement a clustered version in the hzcluster module that works 
perfectly together with the jdbcresourcestore without either of those 
two modules depending on each other.

It is not being used for anything else as of yet but it can be used by 
other resource implementations and other cluster implementations as well.

2) Following up on the resources port, I have also added some new 
utility methods to the Resources class.
https://github.com/NielsCharlier/geoserver/commit/daa934dcacf3064cf14ff5d32f0d16537e7f3598

Previously, we had Files.url(String)->File, taking a url as a String and 
returning a File. And we had 
GeoServerDataDirectory.urlToResource(URL)->Resource which supports a 
custom "resource:"  scheme (which was unsupported by the url(String) 
method).

Instead, I have created instead Resources.fromURL(URL)->Resource and 
Resources.fromURL(String)->Resource which both support the "resource:" 
scheme (in analogy with the already earlier added fromPath(String)).
The Files.url(String)->File is now calling Resources.fromURL() and has 
been deprecated.

Kind Regards
Niels

------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to