@Test public void getNode(){ NodeService.getNodeTopicList(iResponsibleView, new ResponseListener<List<Topic>>() { @Override public void onComplete(List<Topic> result) { for (Topic topic:result){ System.out.println(topic); } } @Override public boolean onFailed(String msg) { return false; } }, "dns",2); }
public static void getNodeTopicList(IResponsibleView iResponsibleView, ResponseListener<List<Topic>> responseListener, String name, int page){ mNodeApi.getNode(name, page) .compose(RxUtil.io2main()) .map(HtmlUtil::getTopics) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); }
NodeService extends BaseService<T> { public static void getNodeTopicList(IResponsibleView iResponsibleView, ResponseListener<List<Topic>> responseListener, String name, int page){ mNodeApi.getNode(name, page) .compose(RxUtil.io2main()) .map(HtmlUtil::getTopics) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } }
NodeService extends BaseService<T> { public static void getNodeTopicList(IResponsibleView iResponsibleView, ResponseListener<List<Topic>> responseListener, String name, int page){ mNodeApi.getNode(name, page) .compose(RxUtil.io2main()) .map(HtmlUtil::getTopics) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } NodeService(IResponsibleView iResponsibleView); }
NodeService extends BaseService<T> { public static void getNodeTopicList(IResponsibleView iResponsibleView, ResponseListener<List<Topic>> responseListener, String name, int page){ mNodeApi.getNode(name, page) .compose(RxUtil.io2main()) .map(HtmlUtil::getTopics) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } NodeService(IResponsibleView iResponsibleView); static void getAllNode(IResponsibleView iResponsibleView,
                                  ResponseListener<List<Node>> responseListener); static void getNodeInfo(IResponsibleView iResponsibleView,
                                   ResponseListener<Node> responseListener,
                                   String name); static void getNodeTopicList(IResponsibleView iResponsibleView,
                                        ResponseListener<List<Topic>> responseListener,
                                        String name,
                                        int page); }
NodeService extends BaseService<T> { public static void getNodeTopicList(IResponsibleView iResponsibleView, ResponseListener<List<Topic>> responseListener, String name, int page){ mNodeApi.getNode(name, page) .compose(RxUtil.io2main()) .map(HtmlUtil::getTopics) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } NodeService(IResponsibleView iResponsibleView); static void getAllNode(IResponsibleView iResponsibleView,
                                  ResponseListener<List<Node>> responseListener); static void getNodeInfo(IResponsibleView iResponsibleView,
                                   ResponseListener<Node> responseListener,
                                   String name); static void getNodeTopicList(IResponsibleView iResponsibleView,
                                        ResponseListener<List<Topic>> responseListener,
                                        String name,
                                        int page);  }