public final class OpenChannelListQuery
extends java.lang.Object
OpenChannel
list.
Currently, 1 kind of OpenChannel
list can be queried.
OpenChannel
s the APP ID
(refer to SendBird.init(String, Context)
has.
The query can be get by calling OpenChannel.createOpenChannelListQuery()
.
Modifier and Type | Class and Description |
---|---|
static interface |
OpenChannelListQuery.OpenChannelListQueryResultHandler
OpenChannelListQuery handler.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Checks if there is a next page.
|
boolean |
isIncludeFrozen()
Checks whether query result includes frozen channels.
|
boolean |
isIncludeMetadata() |
boolean |
isLoading()
Checks if the current query is in communication progress with server.
|
void |
next(OpenChannelListQuery.OpenChannelListQueryResultHandler handler)
Gets the list of
OpenChannel s. |
void |
setCustomTypeFilter(java.lang.String customType)
Sets a filter to return only channels with the specified Custom Type.
|
void |
setIncludeFrozen(boolean includeFrozen)
Sets
true /false to include frozen channels or not. |
void |
setIncludeMetadata(boolean includeMetadata)
Sets whether to include channel metadata on fetch.
|
void |
setLimit(int limit)
Sets the maximum number of
OpenChannel s per queried page. |
void |
setNameKeyword(java.lang.String nameKeyword)
Sets search keyword for channel name.
|
void |
setUrlKeyword(java.lang.String urlKeyword)
Sets search keyword for channel URL.
|
public void setLimit(int limit)
OpenChannel
s per queried page.limit
- The maximum number of OpenChannel
s per page.public void setNameKeyword(java.lang.String nameKeyword)
next(OpenChannelListQueryResultHandler)
will return the list of OpenChannel
s
of which name matches the specified name.nameKeyword
- Name keyword.public void setUrlKeyword(java.lang.String urlKeyword)
next(OpenChannelListQueryResultHandler)
will return the list of OpenChannel
s
of which URL matches the specified URL.urlKeyword
- URL keyword.public void setCustomTypeFilter(java.lang.String customType)
customType
- The Custom Type of the channels to return.public boolean hasNext()
true
there is a next page.public boolean isLoading()
true
if the current query is not finished.public boolean isIncludeFrozen()
public void setIncludeFrozen(boolean includeFrozen)
true
/false
to include frozen channels or not.
This flag is true by default.includeFrozen
- Flag to include frozen channels.public boolean isIncludeMetadata()
public void setIncludeMetadata(boolean includeMetadata)
public void next(OpenChannelListQuery.OpenChannelListQueryResultHandler handler)
OpenChannel
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 OpenChannel
list.
If there is no more pages to be read, an empty List
(not null
)
is returned to handler
.handler
- A callback handler to get the queried result. 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.