|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory<T>
com.alibaba.dubbo.registry.integration.RegistryDirectory<T>
public class RegistryDirectory<T>
RegistryDirectory
| Constructor Summary | |
|---|---|
RegistryDirectory(Class<T> serviceType,
URL url)
|
|
| Method Summary | |
|---|---|
void |
destroy()
destroy. |
List<Invoker<T>> |
doList(Invocation invocation)
|
Class<T> |
getInterface()
get service type. |
Map<String,List<Invoker<T>>> |
getMethodInvokerMap()
Haomin: added for test purpose |
URL |
getUrl()
get url. |
Map<String,Invoker<T>> |
getUrlInvokerMap()
Haomin: added for test purpose |
boolean |
isAvailable()
is available. |
void |
notify(List<URL> urls)
当收到服务变更通知时触发。 通知需处理契约: 1. |
void |
setProtocol(Protocol protocol)
|
void |
setRegistry(Registry registry)
|
void |
subscribe(URL url)
|
static List<Configurator> |
toConfigurators(List<URL> urls)
将overrideURL转换为map,供重新refer时使用. |
| Methods inherited from class com.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory |
|---|
getConsumerUrl, getRouters, isDestroyed, list, setConsumerUrl |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistryDirectory(Class<T> serviceType,
URL url)
| Method Detail |
|---|
public void setProtocol(Protocol protocol)
public void setRegistry(Registry registry)
public void subscribe(URL url)
public void destroy()
Node
destroy in interface Nodedestroy in class AbstractDirectory<T>public void notify(List<URL> urls)
NotifyListener
notify in interface NotifyListenerurls - 已注册信息列表,总不为空,含义同RegistryService.lookup(URL)的返回值。public static List<Configurator> toConfigurators(List<URL> urls)
urls - 契约:
1.override://0.0.0.0/...(或override://ip:port...?anyhost=true)¶1=value1...表示全局规则(对所有的提供者全部生效)
2.override://ip:port...?anyhost=false 特例规则(只针对某个提供者生效)
3.不支持override://规则... 需要注册中心自行计算.
4.不带参数的override://0.0.0.0/ 表示清除override
public List<Invoker<T>> doList(Invocation invocation)
public Class<T> getInterface()
Directory
getInterface in interface Directory<T>public URL getUrl()
Node
getUrl in interface NodegetUrl in class AbstractDirectory<T>public boolean isAvailable()
Node
isAvailable in interface Nodepublic Map<String,Invoker<T>> getUrlInvokerMap()
public Map<String,List<Invoker<T>>> getMethodInvokerMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||