io.reactivex.rxjava3.core.Observable#just ( )源码实例Demo

下面列出了io.reactivex.rxjava3.core.Observable#just ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: cxf   文件: RxJava3ObservableService.java
@GET
@Produces("application/json")
@Path("textJsonList")
public Observable<List<HelloWorldBean>> getJsonList() {
    HelloWorldBean bean1 = new HelloWorldBean();
    HelloWorldBean bean2 = new HelloWorldBean();
    bean2.setGreeting("Ciao");
    return Observable.just(Arrays.asList(bean1, bean2));
}
 
源代码2 项目: cxf   文件: RxJava3ObservableService.java
@GET
@Produces("text/plain")
@Path("text")
public Observable<String> getText() {
    return Observable.just("Hello, world!");
}
 
源代码3 项目: cxf   文件: RxJava3ObservableService.java
@GET
@Produces("application/json")
@Path("textJson")
public Observable<HelloWorldBean> getJson() {
    return Observable.just(new HelloWorldBean());
}