Hi Sergey,
On 25 June 2012 11:32, Sergey Beryozkin <[email protected]> wrote:
>> The plugin also allows you to change the path where it is changed by
>> returning a different path, so for example in my case the fullPath
>> variable is
>> /osgi/service_registry/org/acme/foo/SomeInterface/127.0.0.1#8080##foo
>> It would allow you to change that to something like
>> /osgi/service_registry/org/acme/foo/SomeInterface/my.cloud.host#80##foo
>>
> Sounds good. Minor observation is I guess that the plugin would only be
> interested in replacing the the "127.0.0.1#8080##foo" part, and if yes then
> may be it will be marginally simpler to have:
>
> String process(Map<String, Object> mutableProperties,
> String registryPath,
> String hostInformation);
>
> String actualHostInfo = plugin.process(properties,
>
> "/osgi/service_registry/org/acme/foo/SomeInterface",
> "127.0.0.1#8080##foo");
>
> Not sure if it make sense :-). Having a plugin to do a basic parsing of the
> fullPath would not ne a big issue I guess :-)
Good point. Changing the registryPath doesn't make sense, so I removed
it completely from the callback.
It now has the following API:
String process(Map<String, Object> mutableProperties, String endpointKey);
I've committed it all with unit tests in r1353598.
Cheers,
David