-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
SomeDatabaseService.java
30 lines (26 loc) · 1.13 KB
/
SomeDatabaseService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package io.vertx.example.reactivex.services.serviceproxy;
import io.vertx.codegen.annotations.Fluent;
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.ProxyGen;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import io.vertx.example.reactivex.services.serviceproxy.impl.SomeDatabaseServiceImpl;
@ProxyGen
@VertxGen
public interface SomeDatabaseService {
@GenIgnore
static SomeDatabaseService create() {
return new SomeDatabaseServiceImpl();
}
@GenIgnore
static io.vertx.example.reactivex.services.serviceproxy.reactivex.SomeDatabaseService createProxy(Vertx vertx, String address) {
return new io.vertx.example.reactivex.services.serviceproxy.reactivex.SomeDatabaseService(new SomeDatabaseServiceVertxEBProxy(vertx, address));
}
// To use Rx-ified method, just declare your methods in a call-back style here.
// The Rx-ified methods will be automatically generated.
@Fluent
SomeDatabaseService getDataById(int id, Handler<AsyncResult<JsonObject>> resultHandler);
}