Interface RegistryProtocolListener

All Known Implementing Classes:
MigrationRuleListener

@SPI(scope=MODULE) public interface RegistryProtocolListener
RegistryProtocol listener is introduced to provide a chance to user to customize or change export and refer behavior of RegistryProtocol. For example: re-export or re-refer on the fly when certain condition meets.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notify RegistryProtocol's listeners when the protocol is destroyed
    void
    onExport(RegistryProtocol registryProtocol, org.apache.dubbo.rpc.Exporter<?> exporter)
    Notify RegistryProtocol's listeners when a service is registered
    void
    onRefer(RegistryProtocol registryProtocol, ClusterInvoker<?> invoker, URL url, URL registryURL)
    Notify RegistryProtocol's listeners when a service is subscribed
  • Method Details

    • onExport

      void onExport(RegistryProtocol registryProtocol, org.apache.dubbo.rpc.Exporter<?> exporter)
      Notify RegistryProtocol's listeners when a service is registered
      Parameters:
      registryProtocol - RegistryProtocol instance
      exporter - exporter
      See Also:
    • onRefer

      void onRefer(RegistryProtocol registryProtocol, ClusterInvoker<?> invoker, URL url, URL registryURL)
      Notify RegistryProtocol's listeners when a service is subscribed
      Parameters:
      registryProtocol - RegistryProtocol instance
      invoker - invoker
      url -
      See Also:
    • onDestroy

      void onDestroy()
      Notify RegistryProtocol's listeners when the protocol is destroyed