热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

io.vertx.serviceproxy.ProxyHelper.createProxy()方法的使用及代码示例

本文整理了Java中io.vertx.serviceproxy.ProxyHelper.createProxy()方法的一些代码示例,展示了ProxyHel

本文整理了Java中io.vertx.serviceproxy.ProxyHelper.createProxy()方法的一些代码示例,展示了ProxyHelper.createProxy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProxyHelper.createProxy()方法的具体详情如下:
包路径:io.vertx.serviceproxy.ProxyHelper
类名称:ProxyHelper
方法名:createProxy

ProxyHelper.createProxy介绍

暂无

代码示例

代码示例来源:origin: io.vertx/vertx-consul-service

/**
* Create a proxy to a service that is deployed somewhere on the event bus
*
* @param vertx the Vert.x instance
* @param address the address the service is listening on on the event bus
* @return the service
*/
static ConsulService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(ConsulService.class, vertx, address);
}

代码示例来源:origin: io.vertx/vertx-mongo-service

/**
* Create a proxy to a service that is deployed somewhere on the event bus
*
* @param vertx the Vert.x instance
* @param address the address the service is listening on on the event bus
* @return the service
*/
static MongoService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(MongoService.class, vertx, address);
}

代码示例来源:origin: sczyh30/vertx-kue

/**
* Factory method for creating a {@link JobService} service proxy.
* This is useful for doing RPCs.
*
* @param vertx Vertx instance
* @param address event bus address of RPC
* @return the new {@link JobService} service proxy
*/
static JobService createProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(JobService.class, vertx, address);
}

代码示例来源:origin: io.vertx/vertx-mail-service

/**
* create a proxy of MailService that delegates to the mail service running somewhere else via the event bus
*
* @param vertx the Vertx instance the proxy will be run in
* @param address the eb address of the mail service running somewhere, default is "vertx.mail"
* @return MailService instance that can then be used to send multiple mails
*/
static MailService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(MailService.class, vertx, address);
}

代码示例来源:origin: io.vertx/vertx-mysql-postgresql-service

/**
* Create an event bus proxy to a service which lives somewhere on the network and is listening on the specified
* event bus address
*
* @param vertx the Vert.x instance
* @param address the address on the event bus where the service is listening
* @return
*/
static AsyncSqlService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(AsyncSqlService.class, vertx, address);
}

代码示例来源:origin: advantageous/vertx-node-ec2-eventbus-example

static HelloWorldServiceInterface createProxy(final Vertx vertx,
final String address) {
return ProxyHelper.createProxy(HelloWorldServiceInterface.class, vertx, address);
}

代码示例来源:origin: cescoffier/vertx-workshop

/**
* The method used to create proxy to consume the service.
*
* @param vertx vert.x
* @param address the address where the service is served
* @return the proxy
*/
static RecommendationService createProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(RecommendationService.class, vertx, address);
}

代码示例来源:origin: cescoffier/vertx-workshop

/**
* Method called to create a proxy (to consume the service).
*
* @param vertx vert.x
* @param address the address on the vent bus where the service is served.
* @return the proxy on the {@link DataStorageService}
*/
static DataStorageService createProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(DataStorageService.class, vertx, address);
}

代码示例来源:origin: ef-labs/vertx-elasticsearch-service

static ElasticSearchService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(ElasticSearchService.class, vertx, address);
}

代码示例来源:origin: ef-labs/vertx-elasticsearch-service

static ElasticSearchAdminService createEventBusProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(ElasticSearchAdminService.class, vertx, address);
}

代码示例来源:origin: vert-x3/vertx-service-proxy

static Service createProxy(Vertx vertx, String address) {
return ProxyHelper.createProxy(Service.class, vertx, address);
}

代码示例来源:origin: engagingspaces/vertx-graphql-service-discovery

/**
* Creates a service proxy to the {@link Queryable} implementation
* at the specified address.
*


* The {@link DeliveryOptions} to use on the returned message consumer must be passed as
* plain json, because it does not provide a toJson() method (see:vhttps://github.com/eclipse/vert.x/issues/1502).
*
* @param vertx the vert.x instance
* @param address the address of the service proxy
* @param deliveryOptions the delivery options to use on the message consumer
* @return the graphql service proxy
*/
static Queryable createProxy(Vertx vertx, String address, JsonObject deliveryOptions) {
return ProxyHelper.createProxy(Queryable.class, vertx, address, new DeliveryOptions(deliveryOptions));
}

代码示例来源:origin: io.vertx/vertx-mysql-postgresql-service

public void getConnection(Handler> handler) {
if (closed) {
handler.handle(Future.failedFuture(new IllegalStateException("Proxy is closed")));
return;
}
JsonObject _json = new JsonObject();
DeliveryOptions _deliveryOptiOns= new DeliveryOptions();
_deliveryOptions.addHeader("action", "getConnection");
_vertx.eventBus().send(_address, _json, _deliveryOptions, res -> {
if (res.failed()) {
handler.handle(Future.failedFuture(res.cause()));
} else {
String addr = res.result().headers().get("proxyaddr");
handler.handle(Future.succeededFuture(ProxyHelper.createProxy(SqlConnection.class, _vertx, addr)));
}
});
}

代码示例来源:origin: weld/weld-vertx

/**
*
* @param vertx
* @param executor
* @param serviceInterface
* @param address
*/
ServiceProxyInvocationHandler(ServiceProxySupport serviceProxySupport, Class serviceInterface, String address) {
this.executor = serviceProxySupport.getExecutor();
DeliveryOptions deliveryOptiOns= serviceProxySupport.getDefaultDeliveryOptions(serviceInterface);
if (deliveryOptions != null) {
this.delegate = ProxyHelper.createProxy(serviceInterface, serviceProxySupport.getVertx(), address, deliveryOptions);
} else {
this.delegate = ProxyHelper.createProxy(serviceInterface, serviceProxySupport.getVertx(), address);
}
this.handlerParamPositiOnCache= new ConcurrentHashMap<>();
}

代码示例来源:origin: vert-x3/vertx-service-proxy

@Override
public void createConnectionWithCloseFuture(Handler> resultHandler){
if (closed) {
resultHandler.handle(Future.failedFuture(new IllegalStateException("Proxy is closed")));
return;
}
JsonObject _json = new JsonObject();
DeliveryOptions _deliveryOptiOns= (_options != null) ? new DeliveryOptions(_options) : new DeliveryOptions();
_deliveryOptions.addHeader("action", "createConnectionWithCloseFuture");
_vertx.eventBus().send(_address, _json, _deliveryOptions, res -> {
if (res.failed()) {
resultHandler.handle(Future.failedFuture(res.cause()));
} else {
String addr = res.result().headers().get("proxyaddr");
resultHandler.handle(Future.succeededFuture(ProxyHelper.createProxy(TestConnectionWithCloseFuture.class, _vertx, addr)));
}
});
}
@Override

代码示例来源:origin: vert-x3/vertx-service-proxy

@Override
public void createConnection(String str, Handler> resultHandler){
if (closed) {
resultHandler.handle(Future.failedFuture(new IllegalStateException("Proxy is closed")));
return;
}
JsonObject _json = new JsonObject();
_json.put("str", str);
DeliveryOptions _deliveryOptiOns= (_options != null) ? new DeliveryOptions(_options) : new DeliveryOptions();
_deliveryOptions.addHeader("action", "createConnection");
_vertx.eventBus().send(_address, _json, _deliveryOptions, res -> {
if (res.failed()) {
resultHandler.handle(Future.failedFuture(res.cause()));
} else {
String addr = res.result().headers().get("proxyaddr");
resultHandler.handle(Future.succeededFuture(ProxyHelper.createProxy(TestConnection.class, _vertx, addr)));
}
});
}
@Override

代码示例来源:origin: advantageous/vertx-node-ec2-eventbus-example

helloWorldServiceInterface = ProxyHelper.createProxy(HelloWorldServiceInterface.class, vertx,
HELLO_WORLD_SERVICE);

推荐阅读
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • SpringBoot uri统一权限管理的实现方法及步骤详解
    本文详细介绍了SpringBoot中实现uri统一权限管理的方法,包括表结构定义、自动统计URI并自动删除脏数据、程序启动加载等步骤。通过该方法可以提高系统的安全性,实现对系统任意接口的权限拦截验证。 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 阿,里,云,物,联网,net,core,客户端,czgl,aliiotclient, ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • 前景:当UI一个查询条件为多项选择,或录入多个条件的时候,比如查询所有名称里面包含以下动态条件,需要模糊查询里面每一项时比如是这样一个数组条件:newstring[]{兴业银行, ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • 本文介绍了iOS数据库Sqlite的SQL语句分类和常见约束关键字。SQL语句分为DDL、DML和DQL三种类型,其中DDL语句用于定义、删除和修改数据表,关键字包括create、drop和alter。常见约束关键字包括if not exists、if exists、primary key、autoincrement、not null和default。此外,还介绍了常见的数据库数据类型,包括integer、text和real。 ... [详细]
  • Python SQLAlchemy库的使用方法详解
    本文详细介绍了Python中使用SQLAlchemy库的方法。首先对SQLAlchemy进行了简介,包括其定义、适用的数据库类型等。然后讨论了SQLAlchemy提供的两种主要使用模式,即SQL表达式语言和ORM。针对不同的需求,给出了选择哪种模式的建议。最后,介绍了连接数据库的方法,包括创建SQLAlchemy引擎和执行SQL语句的接口。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • JavaSE笔试题-接口、抽象类、多态等问题解答
    本文解答了JavaSE笔试题中关于接口、抽象类、多态等问题。包括Math类的取整数方法、接口是否可继承、抽象类是否可实现接口、抽象类是否可继承具体类、抽象类中是否可以有静态main方法等问题。同时介绍了面向对象的特征,以及Java中实现多态的机制。 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
author-avatar
手机用户2502931235
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有