public abstract class ListenableRouter extends AbstractRouter implements org.apache.dubbo.common.config.configcenter.ConfigurationListener
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
NAME |
DEFAULT_PRIORITY| 构造器和说明 |
|---|
ListenableRouter(org.apache.dubbo.common.URL url,
String ruleKey) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isForce()
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. |
void |
process(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event) |
<T> List<Invoker<T>> |
route(List<Invoker<T>> invokers,
org.apache.dubbo.common.URL url,
Invocation invocation)
Filter invokers with current routing rule and only return the invokers that comply with the rule.
|
getPriority, getRuleRepository, getUrl, isRuntime, setForce, setPriority, setUrlpublic ListenableRouter(org.apache.dubbo.common.URL url,
String ruleKey)
public void process(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)
process 在接口中 org.apache.dubbo.common.config.configcenter.ConfigurationListenerpublic <T> List<Invoker<T>> route(List<Invoker<T>> invokers, org.apache.dubbo.common.URL url, Invocation invocation) throws RpcException
Routerroute 在接口中 Routerinvokers - invoker listurl - refer urlinvocation - invocationRpcExceptionpublic boolean isForce()
RouterRouter.route(List, URL, Invocation) would be empty. Most of time, most router implementation would
default this value to false.isForce 在接口中 RouterisForce 在类中 AbstractRouterCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.