com.alibaba.dubbo.rpc.cluster.router.script
Class ScriptRouter

java.lang.Object
  extended by com.alibaba.dubbo.rpc.cluster.router.script.ScriptRouter
All Implemented Interfaces:
Router, Comparable<Router>

public class ScriptRouter
extends Object
implements Router

ScriptRouter

Author:
william.liangf

Constructor Summary
ScriptRouter(URL url)
           
 
Method Summary
 int compareTo(Router o)
           
 URL getUrl()
          get the router url.
<T> List<Invoker<T>>
route(List<Invoker<T>> invokers, URL url, Invocation invocation)
          route.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRouter

public ScriptRouter(URL url)
Method Detail

getUrl

public URL getUrl()
Description copied from interface: Router
get the router url.

Specified by:
getUrl in interface Router
Returns:
url

route

public <T> List<Invoker<T>> route(List<Invoker<T>> invokers,
                                  URL url,
                                  Invocation invocation)
                       throws RpcException
Description copied from interface: Router
route.

Specified by:
route in interface Router
url - refer url
Returns:
routed invokers
Throws:
RpcException

compareTo

public int compareTo(Router o)
Specified by:
compareTo in interface Comparable<Router>


Copyright © 2012–2017 Alibaba. All rights reserved.