Class AbstractServiceNameMapping

java.lang.Object
org.apache.dubbo.metadata.AbstractServiceNameMapping
All Implemented Interfaces:
ServiceNameMapping, org.apache.dubbo.rpc.service.Destroyable

public abstract class AbstractServiceNameMapping extends Object implements ServiceNameMapping
  • Constructor Details

    • AbstractServiceNameMapping

      public AbstractServiceNameMapping(org.apache.dubbo.rpc.model.ApplicationModel applicationModel)
  • Method Details

    • setApplicationModel

      public void setApplicationModel(org.apache.dubbo.rpc.model.ApplicationModel applicationModel)
    • get

      public abstract Set<String> get(org.apache.dubbo.common.URL url)
      Get the service names from the specified Dubbo service interface, group, version and protocol
      Returns:
    • getAndListen

      public abstract Set<String> getAndListen(org.apache.dubbo.common.URL url, MappingListener mappingListener)
      Get the service names from the specified Dubbo service interface, group, version and protocol
      Returns:
    • getAndListen

      public Set<String> getAndListen(org.apache.dubbo.common.URL registryURL, org.apache.dubbo.common.URL subscribedURL, MappingListener listener)
      Description copied from interface: ServiceNameMapping
      Get the latest mapping result from remote center and register listener at the same time to get notified once mapping changes.
      Specified by:
      getAndListen in interface ServiceNameMapping
      Parameters:
      listener - listener that will be notified on mapping change
      Returns:
      the latest mapping result from remote center
    • stopListen

      public MappingListener stopListen(org.apache.dubbo.common.URL subscribeURL, MappingListener listener)
      Specified by:
      stopListen in interface ServiceNameMapping
    • putCachedMapping

      public void putCachedMapping(String serviceKey, Set<String> apps)
      Specified by:
      putCachedMapping in interface ServiceNameMapping
    • getMapping

      public Set<String> getMapping(org.apache.dubbo.common.URL consumerURL)
      Specified by:
      getMapping in interface ServiceNameMapping
    • getRemoteMapping

      public Set<String> getRemoteMapping(org.apache.dubbo.common.URL consumerURL)
      Specified by:
      getRemoteMapping in interface ServiceNameMapping
    • removeCachedMapping

      public Set<String> removeCachedMapping(String serviceKey)
      Specified by:
      removeCachedMapping in interface ServiceNameMapping
    • getMappingLock

      public Lock getMappingLock(String key)
    • $destroy

      public void $destroy()
      Specified by:
      $destroy in interface org.apache.dubbo.rpc.service.Destroyable