随笔分类 -  dubbo

摘要:一 接口声明 @SPI(FailoverCluster.NAME) public interface Cluster { /** * Merge the directory invokers to a virtual invoker. * * @param <T> * @param director 阅读全文
posted @ 2022-12-02 15:58 Bannirui 阅读(24) 评论(0) 推荐(0) 编辑
摘要:一 入口 public static void main(String[] args) { // 引用远程服务 此实例很重 封装了与注册中心的连接以及与提供者的连接 ReferenceConfig<DemoService> reference = new ReferenceConfig<DemoSe 阅读全文
posted @ 2022-12-02 15:57 Bannirui 阅读(80) 评论(0) 推荐(0) 编辑
摘要:一 接口 @SPI("netty") public interface Transporter { /** * Bind a server. * * @param url server url * @param handler * @return server * @throws RemotingE 阅读全文
posted @ 2022-11-27 22:07 Bannirui 阅读(22) 评论(0) 推荐(0) 编辑
摘要:作用 远程配置中心的实现 ZookeeperRegistryFactory 实现zookeeper的远程配置中心,获取zk的读取zkClient 一 接口声明 @SPI("dubbo") public interface RegistryFactory { /** * Connect to the 阅读全文
posted @ 2022-11-25 16:50 Bannirui 阅读(40) 评论(0) 推荐(0) 编辑
摘要:一 接口声明 @SPI(HeaderExchanger.NAME) public interface Exchanger { /** * bind. * * @param url * @param handler * @return message server */ @Adaptive({Cons 阅读全文
posted @ 2022-11-25 16:50 Bannirui 阅读(22) 评论(0) 推荐(0) 编辑
摘要:作用 生产者 将Invoker对象导出 InjvmProtocol 没有真正的干活逻辑 仅仅是一些属性赋值 DubboProtol 启动Netty服务 RegistryProtol 通过DubboProtocol启动netty服务端 注册远程配置中心 消费者 创建Invoker对象 Registry 阅读全文
posted @ 2022-11-25 16:49 Bannirui 阅读(39) 评论(0) 推荐(0) 编辑
摘要:作用 生产者将要导出的目标对象封装(代理技术或者反射技术)成Invoker对象 一 接口 @SPI("javassist") public interface ProxyFactory { /** * create proxy. * * @param invoker * @return proxy 阅读全文
posted @ 2022-11-25 16:49 Bannirui 阅读(26) 评论(0) 推荐(0) 编辑
摘要:一 入口驱动 public static void main(String[] args) throws IOException { // 服务提供者暴露服务配置 封装了与注册中心的连接 ServiceConfig<DemoService> service = new ServiceConfig<D 阅读全文
posted @ 2022-11-25 16:48 Bannirui 阅读(22) 评论(0) 推荐(0) 编辑
摘要:一 Dubbo SPI核心 核心实现都在ExtensionLoader中,比较重要的3个入口方法分别是 ExtensionLoader#getExtensionLoader() 扩展实现的加载器 ExtensionLoader#getDefaultExtension() 默认扩展实现 Extensi 阅读全文
posted @ 2022-11-24 19:56 Bannirui 阅读(21) 评论(0) 推荐(0) 编辑
摘要:一 Demo . ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ └── alibaba │ │ │ └── dubbo │ │ │ └── demo │ │ │ └── spi │ │ │ └── jdk │ │ │ ├── JdkSpiCl 阅读全文
posted @ 2022-05-19 20:47 Bannirui 阅读(43) 评论(0) 推荐(0) 编辑
摘要:parse url demo // UrlUtilsTest.java @Test public void test00(){ /** * 往map中添点配置信息 * - application->native-provider * - qos.port=22222 * - path->com.al 阅读全文
posted @ 2022-05-19 17:11 Bannirui 阅读(66) 评论(0) 推荐(0) 编辑
摘要:一 类图 二 field 必赋值的域 | | ApplicationConfig | ModuleConfig | RegistryConfig | ProtocolConfig | MethodConfig | ProviderConfig | | | | | | | | | | name | ✔ 阅读全文
posted @ 2022-05-18 21:51 Bannirui 阅读(75) 评论(0) 推荐(0) 编辑
摘要:开篇明确阅读源码需要解决的疑问,带着问题驱动源码的阅读 版本 为了尽可能减少源码阅读代价,选用2.6.x版本 源码地址 Apache源码或者我Fork的分支study-2.6.x带注释 架构图 Demo . ├── dubbo-demo │ ├── dubbo-demo-api // 接口 │ ├─ 阅读全文
posted @ 2022-05-18 21:23 Bannirui 阅读(36) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示