对等网络节点组网器扩展

页面扩展

扩展说明

对等网络节点组网器。

扩展接口

org.apache.dubbo.container.page.PageHandler

扩展配置

  1. <dubbo:protocol page="xxx,yyy" />
  2. <!-- 缺省值设置,当<dubbo:protocol>没有配置page属性时,使用此配置 -->
  3. <dubbo:provider page="xxx,yyy" />

已知扩展

  • org.apache.dubbo.container.page.pages.HomePageHandler
  • org.apache.dubbo.container.page.pages.StatusPageHandler
  • org.apache.dubbo.container.page.pages.LogPageHandler
  • org.apache.dubbo.container.page.pages.SystemPageHandler

扩展示例

Maven 项目结构:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxPageHandler.java (实现PageHandler接口)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.container.page.PageHandler (纯文本文件,内容为:xxx=com.xxx.XxxPageHandler)

XxxPageHandler.java:

  1. package com.xxx;
  2. import org.apache.dubbo.container.page.PageHandler;
  3. public class XxxPageHandler implements PageHandler {
  4. public Group lookup(URL url) {
  5. // ...
  6. }
  7. }

META-INF/dubbo/org.apache.dubbo.container.page.PageHandler:

  1. xxx=com.xxx.XxxPageHandler

最后修改 December 16, 2022: Fix check (#1736) (97972c1)