src/net/java/sip/communicator/impl/protocol/jabber/OperationSetUserSearchJabberImpl.java
/**
     * Tries to discover the user search service name.
     */
Tries to discover the user search service name.
Tries to discover the user search service name .
private void discoverSearchService()
    {
        new Thread()
        {
            public void run()
            {
                synchronized (userSearchEnabled)
                {
                    List<DomainBareJid> serviceNames = null;
                    try
                    {
                        UserSearchManager usm
                            = new UserSearchManager(provider.getConnection());
                        serviceNames = usm.getSearchServices();
                    }
                    catch (NotConnectedException
                        | InterruptedException
                        | NoResponseException
                        | XMPPErrorException e)
                    {
                        logger.error("Failed to search for service names", e);
                    }
                    if(serviceNames != null && !serviceNames.isEmpty())
                    {
                        serviceName = serviceNames.get(0);
                        setUserSearchEnabled(true);
                    }
                    else
                    {
                        setUserSearchEnabled(false);
                    }
                }
            };
        }.start();
    }
private void discoverSearchService ( ) { new Thread ( ) { public void run ( ) { synchronized ( userSearchEnabled ) { List < DomainBareJid > serviceNames = null ; try { UserSearchManager usm = new UserSearchManager ( provider . getConnection ( ) ) ; serviceNames = usm . getSearchServices ( ) ; } catch ( NotConnectedException | InterruptedException | NoResponseException | XMPPErrorException e ) { logger . error ( "Failed to search for service names" , e ) ; } if ( serviceNames != null && ! serviceNames . isEmpty ( ) ) { serviceName = serviceNames . get ( 0 ) ; setUserSearchEnabled ( true ) ; } else { setUserSearchEnabled ( false ) ; } } } ; } . start ( ) ; }
Tries to discover the user search service name.
Tries to discover the user search service name .