T - the type of service interfacepublic class ScopeClusterInvoker<T> extends Object implements ClusterInvoker<T>, ExporterChangeListener
It selects between local and remote invoker at runtime.
| Constructor and Description |
|---|
ScopeClusterInvoker(Directory<T> directory,
Invoker<T> invoker) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
Directory<T> |
getDirectory() |
Class<T> |
getInterface() |
Invoker<?> |
getInvoker() |
org.apache.dubbo.common.URL |
getRegistryUrl() |
org.apache.dubbo.common.URL |
getUrl() |
Result |
invoke(Invocation invocation)
Checks if the current ScopeClusterInvoker is exported to the local JVM and invokes the corresponding Invoker.
|
boolean |
isAvailable() |
boolean |
isDestroyed() |
void |
onExporterChangeExport(Exporter<?> exporter) |
void |
onExporterChangeUnExport(Exporter<?> exporter) |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waithasProxyInvokers, isServiceDiscoverypublic org.apache.dubbo.common.URL getUrl()
getUrl in interface org.apache.dubbo.common.Nodepublic org.apache.dubbo.common.URL getRegistryUrl()
getRegistryUrl in interface ClusterInvoker<T>public Directory<T> getDirectory()
getDirectory in interface ClusterInvoker<T>public boolean isDestroyed()
isDestroyed in interface ClusterInvoker<T>public boolean isAvailable()
isAvailable in interface org.apache.dubbo.common.Nodepublic void destroy()
destroy in interface org.apache.dubbo.common.Nodepublic Class<T> getInterface()
getInterface in interface Invoker<T>public Result invoke(Invocation invocation) throws RpcException
invoke in interface Invoker<T>invocation - the invocation to be performedRpcException - if there was an error during the invocationpublic void onExporterChangeExport(Exporter<?> exporter)
onExporterChangeExport in interface ExporterChangeListenerpublic void onExporterChangeUnExport(Exporter<?> exporter)
onExporterChangeUnExport in interface ExporterChangeListenerpublic Invoker<?> getInvoker()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.