Java Code Examples for io.reactivex.rxjava3.core.Observable#just()

The following examples show how to use io.reactivex.rxjava3.core.Observable#just() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RxJava3ObservableService.java    From cxf with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 2
Source File: RxJava3ObservableService.java    From cxf with Apache License 2.0 4 votes vote down vote up
@GET
@Produces("text/plain")
@Path("text")
public Observable<String> getText() {
    return Observable.just("Hello, world!");
}
 
Example 3
Source File: RxJava3ObservableService.java    From cxf with Apache License 2.0 4 votes vote down vote up
@GET
@Produces("application/json")
@Path("textJson")
public Observable<HelloWorldBean> getJson() {
    return Observable.just(new HelloWorldBean());
}