Package 

Class UserListQuery


  • 
    public class UserListQuery
    
                        

    A class representing query to retrieve lists related to User.

    Currently, 5 kinds of User list can be queried.

    • The list of all Users of your application.

      The query can be get by calling createUserListQuery.

    • The list of Users of the specified User IDs.

      The query can be get by calling createUserListQuery.

    • The list of blocked Users blocked by currently logged-in User.

      The query can be get by calling createBlockedUserListQuery.

    • The list of participants (who are online) in an open channel.

      The query can be get by calling createParticipantListQuery.

    • The list of forced to be muted Users (including online and offline) from an open channel.

      The query can be get by calling createMutedUserListQuery.

    • The list of banned Users (including online and offline) from an open channel.

      The query can be get by calling createBannedUserListQuery.

    • Method Summary

      Modifier and Type Method Description
      void setLimit(int limit) Sets the maximum number of Users per queried page.
      boolean hasNext() Checks if there is a next page.
      synchronized boolean isLoading() Checks if the current query is in communication progress with server.
      void setMetaDataFilter(String metaDataKey, List<String> metaDataValues) Sets User meta data filter.
      synchronized void next(UserListQuery.UserListQueryResultHandler handler) Gets the list of Users.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setLimit

         void setLimit(int limit)

        Sets the maximum number of Users per queried page.

        Parameters:
        limit - The maximum number of Users per page.
      • hasNext

         boolean hasNext()

        Checks if there is a next page.

      • isLoading

         synchronized boolean isLoading()

        Checks if the current query is in communication progress with server.

      • setMetaDataFilter

        @Deprecated() void setMetaDataFilter(String metaDataKey, List<String> metaDataValues)

        Sets User meta data filter. User list containing only and exactly the passed User meta data will be returned.

        Parameters:
        metaDataKey - User meta data key.
        metaDataValues - User meta data values.
      • next

         synchronized void next(UserListQuery.UserListQueryResultHandler handler)

        Gets the list of Users. The queried result is passed to handler as List.If this method is repeatedly called after each next() is finished, it retrieves the following pages of the User list.If there is no more pages to be read, an empty List (not null)is returned to handler.For MUTED_USER or BANNED_USER list,you can use users from the result user list as RestrictedUser to get more detailed information about the restrictions.

        Parameters:
        handler - A callback handler to get the queried result.