Closed bjhargrave closed 4 years ago
Comment author: @tjwatson
CPEG meeting December 11, 2019:
We should rename ConnectFactory because it is not really a factory for creating objects. Instead it is something that hooks into the framework lifecycle for initialization/start/stop of the framework and provides a lookup for ConnectModule objects. Some suggestions from the call:
ConnectModules - plural form of ConnectModule because it is a view on all the ConnectModule objects available
ConnectFramework - A framework for accessing ConnectModules
ConnectHook - Hooks into the framework for accessing ConnectModules
ConnectLayer - A Layer used for accessing ConnectModules
Connect - Just simply call it connect
Todor had a suggestion, but I forgot it???
+1 to ConnectFramework
Comment author: @tjwatson
At the CPEG meeting today we also decided to move the method newFramework(Map<String,String> configuration,ConnectFactory connectFactory) from FrameworkFactory to a type ConnectFrameworkFactory in the org.osgi.framework.connect package. This way if a framework does not support OSGi connect they can just avoid having a META-INF/service file for the ConnectFrameworkFactory type. A launcher wanting to use Connect would then use the ConnectFrameworkFactory to create the Framework instead of the FrameworkFactory
With this in mind I think it makes some sense to rename the ConnectFactory to ConnectFramework and then have the method:
Framework ConnectFrameworkFactory.newFramework( Map<String,String> configuration, ConnectFramework connectFramework)
I'm going to go ahead with this change while I create the new meta-inf service interface ConnectFrameworkFactory. Also, I do not plan to have ConnectFrameworkFactory extend FrameworkFactory, that way if new methods are added to FrameworkFactory in the future we don't have to worry about making sure it makes sense to the ConnectFrameworkFactory interface.
Comment author: @rotty3000
+1
Comment author: @tjwatson
Closing this old discussion. Connect API has changed to use a ConnectFrameworkFactory
Original bug ID: BZ#3132 From: @tjwatson Reported version: R8