Skip to content
RestyGWT RxJava Adapter
Java HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
processor
.gitignore
.travis.yml
README.md
pom.xml

README.md

RestyGWT RxJava Adapter Build Status

If you create this 😟...

@RestyService
@Path("/greeting-service")
public interface GreetingService {

    @POST Observable<Overlay> overlay(Overlay name);

    @POST Observable<Pojo> pojo(Pojo name);

    @POST Observable<Interop> interop(Interop name);

    static GreetingService create() { return new GreetingService_RestyAdapter();
}

This library generate this 😮...

public class GreetingService_RestyAdapter extends AbstractAdapterService implements GreetingService {
  private GreetingService_RestyService service = GWT.create(GreetingService_RestyService.class);

  public GreetingService_RestyService service() { return service; }

  public Observable<Overlay> overlay(final Overlay name) {
    return Observable.create(s -> service().overlay(name, SubscriberMethodCallback.overlay(s))); 
  }

  public Observable<Pojo> pojo(final Pojo name) {
    return Observable.create(s -> service().pojo(name, SubscriberMethodCallback.method(s))); 
  }

  public Observable<Interop> interop(final Interop name) {
    return Observable.create(s -> service().interop(name, SubscriberMethodCallback.overlay(s))); 
  }
}

So you can do this 😲...

GreetingService.create().pojo(somePojo).subscribe(pojoWidget::show,pojoWidget::error);
You can’t perform that action at this time.