@Test public void getNodeInfo(){ NodeService.getNodeInfo(iResponsibleView, new ResponseListener<Node>() { @Override public void onComplete(Node result) { System.out.println(result); } @Override public boolean onFailed(String msg) { System.out.println(msg); return false; } }, "lol"); }
public static void getNodeInfo(IResponsibleView iResponsibleView, ResponseListener<Node> responseListener, String name){ mNodeApi.getNodeInfo(name) .compose(RxUtil.io2main()) .map(jsonObject -> new Gson().fromJson(jsonObject, Node.class)) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); }
NodeService extends BaseService<T> { public static void getNodeInfo(IResponsibleView iResponsibleView, ResponseListener<Node> responseListener, String name){ mNodeApi.getNodeInfo(name) .compose(RxUtil.io2main()) .map(jsonObject -> new Gson().fromJson(jsonObject, Node.class)) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } }
NodeService extends BaseService<T> { public static void getNodeInfo(IResponsibleView iResponsibleView, ResponseListener<Node> responseListener, String name){ mNodeApi.getNodeInfo(name) .compose(RxUtil.io2main()) .map(jsonObject -> new Gson().fromJson(jsonObject, Node.class)) .subscribe(new RxObserver2<>(iResponsibleView, responseListener)); } NodeService(IResponsibleView iResponsibleView); }
NodeService extends BaseService<T> { public static void getNodeInfo(IResponsibleView iResponsibleView, ResponseListener<Node> responseListener, String name){ mNodeApi.getNodeInfo(name) .compose(RxUtil.io2main()) .map(jsonObject -> new Gson().fromJson(jsonObject, Node.class)) .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 getNodeInfo(IResponsibleView iResponsibleView, ResponseListener<Node> responseListener, String name){ mNodeApi.getNodeInfo(name) .compose(RxUtil.io2main()) .map(jsonObject -> new Gson().fromJson(jsonObject, Node.class)) .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);  }