Class IQMuclumbusSearchHandler

    • Constructor Detail

      • IQMuclumbusSearchHandler

        public IQMuclumbusSearchHandler​(MultiUserChatService mucService)
        Creates a new instance of the search provider.
        Parameters:
        mucService - The server for which to return search results.
    • Method Detail

      • handleIQ

        public org.xmpp.packet.IQ handleIQ​(org.xmpp.packet.IQ iq)
        Constructs an answer on a IQ stanza that contains a search request. The answer will be an IQ stanza of type 'result' or 'error'.
        Parameters:
        iq - The IQ stanza that is the search request.
        Returns:
        An answer to the provided request.
      • searchForChatrooms

        protected List<MUCRoom> searchForChatrooms​(org.jivesoftware.openfire.muc.spi.IQMuclumbusSearchHandler.SearchParameters params)
      • sortByAddress

        public static List<MUCRoom> sortByAddress​(List<MUCRoom> mucs)
        Order the provided list by JID of the MUC
        Parameters:
        mucs - The unordered list that will be sorted.
        Returns:
        The order list of MUC rooms.
      • sortByUserAmount

        public static List<MUCRoom> sortByUserAmount​(List<MUCRoom> mucs)
        Sorts the provided list in such a way that the MUC with the most users will be the first one in the list.
        Parameters:
        mucs - The unordered list that will be sorted.
        Returns:
        The sorted list of MUC rooms.