Class AppScriptStateRouter<T>
java.lang.Object
org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
org.apache.dubbo.rpc.cluster.router.script.config.AppScriptStateRouter<T>
- All Implemented Interfaces:
EventListener,org.apache.dubbo.common.config.configcenter.ConfigurationListener,StateRouter<T>
public class AppScriptStateRouter<T>
extends AbstractStateRouter<T>
implements org.apache.dubbo.common.config.configcenter.ConfigurationListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNotify the router the invoker list.voidprocess(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event) voidsetScriptRule(ScriptRule scriptRule) voidstop()Methods inherited from class org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
buildSnapshot, getNextRouter, getRuleRepository, getUrl, isForce, isRuntime, route, setForce, setNextRouter, setUrl
-
Constructor Details
-
AppScriptStateRouter
public AppScriptStateRouter(org.apache.dubbo.common.URL url)
-
-
Method Details
-
process
public void process(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event) - Specified by:
processin interfaceorg.apache.dubbo.common.config.configcenter.ConfigurationListener
-
notify
Description copied from interface:StateRouterNotify the router the invoker list. Invoker list may change from time to time. This method gives the router a chance to prepare beforeStateRouter.route(BitList, URL, Invocation, boolean, Holder)gets called. No need to notify next node.- Specified by:
notifyin interfaceStateRouter<T>- Overrides:
notifyin classAbstractStateRouter<T>- Parameters:
invokers- invoker list
-
stop
public void stop()- Specified by:
stopin interfaceStateRouter<T>
-
setScriptRule
-