That doesn’t work as StreamManagementStreamFeatureProvider doesn’t take any type parameters
As I mentioned in the other thread, using SmackTcpSmackInitializer doesn’t want to work for me. If you have documentation which explains exactly how to use it, I would be grateful if you could point me in the right direction as I know it should be working but in my tests, it does not intiialise stream management.
But that’s only tangentially related to this problem which is that this API is available to developers to use and it doesn’t really work as it stands. Would it be possible to refactor the StreamManagementStreamFeatureProvider to take a type extension or alter the addStreamFeatureProvider method on ProviderManager to not demand a PacketExtensionProvider that only has a type parameter of ?
Edit: Adding some test code to help clarify the situation.
If doing the following
SmackTcpSmackInitalizer smackTcpSmackInitalizer = new SmackTcpSmackInitalizer();
I would expect stream management to be enabled.
However, once I log into my server and then ask the connection if stream management is enabled…
I get false returned.
If I then ask the provider manager for the stream feature provider…
I get a null returned.
Is this how the SmackTCPSmackInitializer is supposed to be used or any I doing it wrong?
Edit: More info.
When debugging into ProviderManager I can see the SmackTcpSmackInitializer being used and a ProviderLoader being passed in with the correct ‘sm’ stream feature provider, but the code in ProviderManager.addLoader ignores it and never adds it to the collection of stream feature providers.
The code in ProviderManager.addLoader also has checks for null on loader.getIQProviderInfo() and loader.getExtensionProviderInfo() which appears to do nothing as those collections always return an empty LinkedList and are never null. See ProviderFileLoader.