I'm trying to develop a database service proxy and using an verticle that extends io.vertx.reactivex.core.AbstractVerticle, so that I can use rxJava semantics around database calls. Problem is, when I code generate the service proxy, I get this:
ServiceVertxEBProxy.java:[37,1] a type with the same simple name is already defined by the single-type-import of io.vertx.core.Vertx
The database service is responsible for dealing with the shared dbclient, which I am doing by:
public Single<SQLConnection> getConnection()
{
JDBCClient dbClient = JDBCClient.createShared( vertx, CONFIG, DATASOURCE );
return dbClient.rxGetConnection().flatMap( conn -> {
Single<SQLConnection> connectionSingle = Single.just( conn );
return connectionSingle.doFinally( conn::close );
} );
}
Is it possible to use @ProxyGen to create a proxy client that references rxJava in the service?
For reference, the interface declares factory methods to instantiate the service by following the vertx.io documention.
import io.vertx.reactivex.core.Vertx;
@ProxyGen
public interface ChatDbService
{
static ChatDbService create( Vertx vertx )
{
return new ChatDbServiceImpl( vertx );
}
static ChatDbService createProxy( Vertx vertx, String address )
{
return new ChatDbServiceVertxEBProxy( vertx.getDelegate(), address );
}
}
Help and insight would be appreciated.