Replace interface+impls with a single concrete container which wraps a map. This breaks code which was sub-classing. However, no external code can be found which does this. A build() method is used instead of simple ctor so that the ctor is private, which will cause theoretical external sub-class code to fail to compile. Code using getChannelProviderRegistry() and existing methods will behave as before. Add ChannelProviderRegistry::getFactory() for pass through to ChannelProviderFactory (Registery is just a proxy()...) Remove existing get/create virtual method in favor of getFactory. Update both existing implementations. Add SimpleChannelProviderFactory to cut down on boilerplace for the common case. Add method to clear mapping and release any saved sharedInstance.
2.1 KiB
2.1 KiB