public static synchronized ServiceDiscoveryManager getInstanceFor ( XMPPConnection connection ) { ServiceDiscoveryManager sdm = instances . get ( connection ) ; if ( sdm == null ) { sdm = new ServiceDiscoveryManager ( connection ) ; // Register the new instance and associate it with the connection instances . put ( connection , sdm ) ; } return sdm ; }
Returns the ServiceDiscoveryManager instance associated with a given XMPPConnection .