public class TagRouter extends AbstractRouter implements ConfigurationListener
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
NAME |
DEFAULT_PRIORITY| 构造器和说明 |
|---|
TagRouter(DynamicConfiguration configuration,
org.apache.dubbo.common.URL url) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.dubbo.common.URL |
getUrl()
Get the router url.
|
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. |
boolean |
isRuntime()
To decide whether this router need to execute every time an RPC comes or should only execute when addresses or
rule change.
|
<T> void |
notify(List<Invoker<T>> invokers)
Notify the router the invoker list.
|
void |
process(ConfigChangeEvent 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.
|
void |
setApplication(String app) |
getPriority, setConfiguration, setForce, setPriority, setUrlpublic TagRouter(DynamicConfiguration configuration, org.apache.dubbo.common.URL url)
public void process(ConfigChangeEvent event)
process 在接口中 ConfigurationListenerpublic org.apache.dubbo.common.URL getUrl()
RoutergetUrl 在接口中 RoutergetUrl 在类中 AbstractRouterpublic <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 isRuntime()
RouterisRuntime 在接口中 RouterisRuntime 在类中 AbstractRouterpublic boolean isForce()
RouterRouter.route(List, URL, Invocation) would be empty. Most of time, most router implementation would
default this value to false.isForce 在接口中 RouterisForce 在类中 AbstractRouterpublic void setApplication(String app)
public <T> void notify(List<Invoker<T>> invokers)
RouterRouter.route(List, URL, Invocation) gets called.Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.