/** * Creates a new ServiceDiscoveryManager for a given connection. This means that the service * manager will respond to any service discovery request that the connection may receive. * * @param connection the connection to which a ServiceDiscoveryManager is going to be created. */ public ServiceDiscoveryManager(Connection connection) { this.connection = connection; // For every XMPPConnection, add one EntityCapsManager. if (connection instanceof XMPPConnection) { setEntityCapsManager(new EntityCapsManager()); capsManager.addCapsVerListener(new CapsPresenceRenewer()); } renewEntityCapsVersion(); init(); }