public class UserListQuery
extends java.lang.Object
User
.
Currently, 5 kinds of User
list can be queried.
User
s of your application.
The query can be get by calling SendBird.createUserListQuery()
.
User
s of the specified User
IDs.
The query can be get by calling SendBird.createUserListQuery(List)
.
User
s blocked by currently logged-in User
.
The query can be get by calling SendBird.createBlockedUserListQuery()
.
The query can be get by calling OpenChannel.createParticipantListQuery()
.
User
s (including online and offline) from an open channel.
The query can be get by calling OpenChannel.createMutedUserListQuery()
.
User
s (including online and offline) from an open channel.
The query can be get by calling OpenChannel.createBannedUserListQuery()
.
Modifier and Type | Class and Description |
---|---|
static interface |
UserListQuery.UserListQueryResultHandler
UserListQueryResult handler.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Checks if there is a next page.
|
boolean |
isLoading()
Checks if the current query is in communication progress with server.
|
void |
next(UserListQuery.UserListQueryResultHandler handler)
Gets the list of
User s. |
void |
setLimit(int limit)
Sets the maximum number of
User s per queried page. |
void |
setMetaDataFilter(java.lang.String metaDataKey,
java.util.List<java.lang.String> metaDataValues)
Deprecated.
As of 3.0.81, replaced by
ApplicationUserListQuery.setMetaDataFilter(String, List) }. |
public void setLimit(int limit)
User
s per queried page.limit
- The maximum number of User
s per page.public boolean hasNext()
true
if there is a next page.public boolean isLoading()
true
if the current query is not finished.@Deprecated public void setMetaDataFilter(java.lang.String metaDataKey, java.util.List<java.lang.String> metaDataValues)
ApplicationUserListQuery.setMetaDataFilter(String, List)
}.User
meta data filter. User
list containing only and exactly the passed User
meta data will be returned.metaDataKey
- User
meta data key.metaDataValues
- User
meta data values.public void next(UserListQuery.UserListQueryResultHandler handler)
User
s. 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 QueryType#MUTED_USER
or QueryType#BANNED_USER
list,
you can use users from the result user list as RestrictedUser
to get more detailed information about the restrictions.handler
- A callback handler to get the queried result.RestrictedUser
,
RestrictionInfo
,
RestrictedUser#getRestrictionInfo()
Copyright © 2021, Sendbird or its affiliates. All rights reserved.
Report a bug or request a feature
For further developer documentation, see Chat SDK Documentation. That documentation contains more detailed descriptions, conceptual overviews, definitions of terms, and code examples.