Interface RegistryProtocolListener
- All Known Implementing Classes:
MigrationRuleListener
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 TypeMethodDescriptionvoidNotify RegistryProtocol's listeners when the protocol is destroyedvoidonExport(RegistryProtocol registryProtocol, org.apache.dubbo.rpc.Exporter<?> exporter) Notify RegistryProtocol's listeners when a service is registeredvoidonRefer(RegistryProtocol registryProtocol, ClusterInvoker<?> invoker, URL url, URL registryURL) Notify RegistryProtocol's listeners when a service is subscribed
-
Method Details
-
onExport
Notify RegistryProtocol's listeners when a service is registered- Parameters:
registryProtocol- RegistryProtocol instanceexporter- 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 instanceinvoker- invokerurl-- See Also:
-
onDestroy
void onDestroy()Notify RegistryProtocol's listeners when the protocol is destroyed
-