类 TagRouter

  • 所有已实现的接口:
    Comparable<Router>, EventListener, org.apache.dubbo.common.config.configcenter.ConfigurationListener, Router

    public class TagRouter
    extends AbstractRouter
    implements org.apache.dubbo.common.config.configcenter.ConfigurationListener
    TagRouter, "application.tag-router"
    • 构造器详细资料

      • TagRouter

        public TagRouter​(org.apache.dubbo.common.URL url)
    • 方法详细资料

      • process

        public void process​(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)
        指定者:
        process 在接口中 org.apache.dubbo.common.config.configcenter.ConfigurationListener
      • getUrl

        public org.apache.dubbo.common.URL getUrl()
        从接口复制的说明: Router
        Get the router url.
        指定者:
        getUrl 在接口中 Router
        覆盖:
        getUrl 在类中 AbstractRouter
        返回:
        url
      • route

        public <T> List<Invoker<T>> route​(List<Invoker<T>> invokers,
                                          org.apache.dubbo.common.URL url,
                                          Invocation invocation)
                                   throws RpcException
        从接口复制的说明: Router
        Filter invokers with current routing rule and only return the invokers that comply with the rule.
        指定者:
        route 在接口中 Router
        参数:
        invokers - invoker list
        url - refer url
        invocation - invocation
        返回:
        routed invokers
        抛出:
        RpcException
      • isRuntime

        public boolean isRuntime()
        从接口复制的说明: Router
        To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.
        指定者:
        isRuntime 在接口中 Router
        覆盖:
        isRuntime 在类中 AbstractRouter
        返回:
        true if the router need to execute every time.
      • isForce

        public boolean isForce()
        从接口复制的说明: Router
        To decide whether this router should take effect when none of the invoker can match the router rule, which means the Router.route(List, URL, Invocation) would be empty. Most of time, most router implementation would default this value to false.
        指定者:
        isForce 在接口中 Router
        覆盖:
        isForce 在类中 AbstractRouter
        返回:
        true to execute if none of invokers matches the current router
      • setApplication

        public void setApplication​(String app)
      • notify

        public <T> void notify​(List<Invoker<T>> invokers)
        从接口复制的说明: Router
        Notify the router the invoker list. Invoker list may change from time to time. This method gives the router a chance to prepare before Router.route(List, URL, Invocation) gets called.
        指定者:
        notify 在接口中 Router
        类型参数:
        T - invoker's type
        参数:
        invokers - invoker list