Open victorpasqualino opened 1 year ago
Motivation:
Example:
public class Example { public static interface Repository<Key, Value> {} @ProxyGen public static interface UserRepository extends Repository<String, User> {} public static class User {} public static abstract class AbstractRepositoryVerticle<Key, Value> extends AbstractVerticle implements Repository<Key, Value> { private final String address; private final Class<? extends Repository<Key, Value>> clazz; public AbstractRepositoryVerticle(String address, Class<? extends Repository<Key, Value>> clazz) { this.address = address; this.clazz = clazz; } @Override public void start() throws Exception { new ServiceBinder(vertx).setAddress(address).register(clazz, this); } } public static class UserRepositoryVerticle extends AbstractRepositoryVerticle<String, User> implements UserRepository { public UserRepositoryVerticle() { super("user-repository", UserRepository.class); } } }
Motivation:
Example: