public class ChannelQuery extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ChannelQuery.Builder |
static class |
ChannelQuery.Result
Result of the query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChannelQueryListener(ChannelQueryListener listener)
Adds a new listener that is called every time the query is executed.
|
boolean |
equals(Object obj) |
void |
execute(ChannelQueryListener listener)
Executes the query and calls the listener with the result.
|
static Executor |
getDefaultQueryExecutor()
The executor on which the queries are executed.
|
String |
getQuery()
The text of the query.
|
ChannelQuery.Result |
getResult()
The result of the query, if present.
|
int |
hashCode() |
static ChannelQuery.Builder |
query(String query)
A new query with the given search string.
|
void |
refresh()
Triggers a new execution of the query, and calls
all the listeners as a result.
|
void |
removeChannelQueryListener(ChannelQueryListener listener)
Removes a listener.
|
static void |
setDefaultQueryExecutor(Executor defaultQueryExecutor)
Change the executor on which the queries are executed.
|
String |
toString() |
public static ChannelQuery.Builder query(String query)
query - the query; cannot be nullpublic static Executor getDefaultQueryExecutor()
public static void setDefaultQueryExecutor(Executor defaultQueryExecutor)
TODO: it's not clear who has the responsibility of closing the old executor
defaultQueryExecutor - the new executorpublic void addChannelQueryListener(ChannelQueryListener listener)
execute(ChannelQueryListener).listener - a new listenerpublic void removeChannelQueryListener(ChannelQueryListener listener)
listener - the listener to be removedpublic String getQuery()
public ChannelQuery.Result getResult()
public void execute(ChannelQueryListener listener)
listener - - channel query listenerpublic void refresh()
Copyright © 2016. All Rights Reserved.