com.alibaba.dubbo.rpc.cluster.directory
Class AbstractDirectory<T>

java.lang.Object
  extended by com.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory<T>
All Implemented Interfaces:
Node, Directory<T>
Direct Known Subclasses:
RegistryDirectory, StaticDirectory

public abstract class AbstractDirectory<T>
extends Object
implements Directory<T>

增加router的Directory

Author:
chao.liuc

Constructor Summary
AbstractDirectory(URL url)
           
AbstractDirectory(URL url, List<Router> routers)
           
AbstractDirectory(URL url, URL consumerUrl, List<Router> routers)
           
 
Method Summary
 void destroy()
          destroy.
 URL getConsumerUrl()
           
 List<Router> getRouters()
           
 URL getUrl()
          get url.
 boolean isDestroyed()
           
 List<Invoker<T>> list(Invocation invocation)
          list invokers.
 void setConsumerUrl(URL consumerUrl)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.alibaba.dubbo.rpc.cluster.Directory
getInterface
 
Methods inherited from interface com.alibaba.dubbo.common.Node
isAvailable
 

Constructor Detail

AbstractDirectory

public AbstractDirectory(URL url)

AbstractDirectory

public AbstractDirectory(URL url,
                         List<Router> routers)

AbstractDirectory

public AbstractDirectory(URL url,
                         URL consumerUrl,
                         List<Router> routers)
Method Detail

list

public List<Invoker<T>> list(Invocation invocation)
                      throws RpcException
Description copied from interface: Directory
list invokers.

Specified by:
list in interface Directory<T>
Returns:
invokers
Throws:
RpcException

getUrl

public URL getUrl()
Description copied from interface: Node
get url.

Specified by:
getUrl in interface Node
Returns:
url.

getRouters

public List<Router> getRouters()

getConsumerUrl

public URL getConsumerUrl()

setConsumerUrl

public void setConsumerUrl(URL consumerUrl)

isDestroyed

public boolean isDestroyed()

destroy

public void destroy()
Description copied from interface: Node
destroy.

Specified by:
destroy in interface Node


Copyright © 2012–2017 Alibaba. All rights reserved.