I want to create a factory which will create a smack XMPPConnection. The factory should return the real XMPPConnection or a NullObject if the connection could not be made.
However smack's XMPPConnection is a concrete class.
It does not implement any interfaces, so I can't use java dynamic proxy API to proxy the sucker. I could extend the XMPPConnection but that's not very elegant.
Are there any other options ? Note that the factory must never return a null !