How Do You Create a Custom Provider Manager?

The ProviderManager class has a setInstance method
that is documented as allowing you to “provide your own provider manager,” as long as you do it before creating any XMPP connections. I’d like to do this (the reason why would be another topic), but I can’t figure out how.

The setInstance method’s only argument is of type ProviderManager, which means that it can only take an object of the ProviderManager class or something that extends this class. But the ProviderManager’s only constructor is private, which means that *nothing *can extend this class because no extension can construct its superclass.

Am I missing something? Has anyone ever tried to do this?

And if the setInstance logic is indeed broken, what do people think would be the best fix for it? My own inclination is to make the ProviderManager’s constructor protected instead of private, but if there are better fixes I’d like to hear about them.

Thanks.

Any solution to this problem?

I’m afraid not. Truthfully, I’ve forgotten what problem I was trying to solve, but I remember that I worked around it another way. Sorry.

Looks like the constructor was made private in 2003, thus rendering the setInstance method useless.

I have no idea why it was done.