com.alibaba.dubbo.rpc.cluster
Interface Router

All Superinterfaces:
Comparable<Router>
All Known Implementing Classes:
ConditionRouter, MockInvokersSelector, ScriptRouter

public interface Router
extends Comparable<Router>

Router. (SPI, Prototype, ThreadSafe)

Routing

Author:
chao.liuc
See Also:
Cluster.join(Directory), Directory.list(Invocation)

Method Summary
 URL getUrl()
          get the router url.
<T> List<Invoker<T>>
route(List<Invoker<T>> invokers, URL url, Invocation invocation)
          route.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getUrl

URL getUrl()
get the router url.

Returns:
url

route

<T> List<Invoker<T>> route(List<Invoker<T>> invokers,
                           URL url,
                           Invocation invocation)
                       throws RpcException
route.

Parameters:
invokers -
url - refer url
invocation -
Returns:
routed invokers
Throws:
RpcException


Copyright © 2012–2017 Alibaba. All rights reserved.