本文整理汇总了Java中com.urx.core.ResponseHandler类的典型用法代码示例。如果您正苦于以下问题:Java ResponseHandler类的具体用法?Java ResponseHandler怎么用?Java ResponseHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResponseHandler类属于com.urx.core包,在下文中一共展示了ResponseHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: executeURXSearch
import com.urx.core.ResponseHandler; //导入依赖的package包/类
private void executeURXSearch(String queryString,String actionType, String domain) {
// Execute the query
client.query(Util.createQueryFromParameters(queryString, actionType, domain), new ResponseHandler<SearchResults>() {
@Override
public void onSuccess(SearchResults results) {
searchAdapter.setSearchResultList(results.getResults());
}
@Override
public void onFailure(ApiException failure) {
Log.d("FAIL", failure.toString());
}
});
}
示例2: executeQuery
import com.urx.core.ResponseHandler; //导入依赖的package包/类
public void executeQuery() {
// Execute the query. Dealing with null types within createQueryFromParameters
final Query q = Util.createQueryFromParameters(getStringFromView(), this.actionType, this.domain);
client.query(q, new ResponseHandler<SearchResults>() {
@Override
public void onSuccess(SearchResults results) {
// Update Button using first result
searchResult = results.getResults().get(0);
updateViews(searchResult);
}
});
}
示例3: executeSearch
import com.urx.core.ResponseHandler; //导入依赖的package包/类
protected void executeSearch() {
// Build the query: "ellie goulding" AND lights AND action:ListenAction
final Query q = phrase("ellie goulding").and(term("lights")).and(action(Listen));
// Execute the query
client.query(q, new ResponseHandler<SearchResults>() {
@Override
public void onSuccess(SearchResults results) {
// Update our views using the first search result
SearchResult firstResult = results.getResults().get(0);
updateViews(firstResult, client);
}
});
}