| Modifier and Type | Class and Description |
|---|---|
static class |
RegistryProtocol.InvokerDelegate<T> |
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_REGISTER_CONSUMER_KEYS |
static String[] |
DEFAULT_REGISTER_PROVIDER_KEYS |
| Constructor and Description |
|---|
RegistryProtocol() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy protocol:
1. |
<T> Exporter<T> |
export(Invoker<T> originInvoker)
Export service for remote invocation:
1. |
int |
getDefaultPort()
Get default port when user doesn't config the port.
|
Map<URL,NotifyListener> |
getOverrideListeners() |
String[] |
getParamsToRegistry(String[] defaultKeys,
String[] additionalParameterKeys) |
URL |
getRegisteredConsumerUrl(URL consumerUrl,
URL registryUrl) |
static RegistryProtocol |
getRegistryProtocol() |
<T> void |
reExport(Invoker<T> originInvoker,
URL newInvokerUrl) |
<T> Invoker<T> |
refer(Class<T> type,
URL url)
Refer a remote service:
1. |
void |
register(URL registryUrl,
URL registeredProviderUrl) |
void |
setCluster(Cluster cluster) |
void |
setProtocol(Protocol protocol) |
void |
setProxyFactory(ProxyFactory proxyFactory) |
void |
setRegistryFactory(RegistryFactory registryFactory) |
void |
unregister(URL registryUrl,
URL registeredProviderUrl) |
public static final String[] DEFAULT_REGISTER_PROVIDER_KEYS
public static final String[] DEFAULT_REGISTER_CONSUMER_KEYS
public static RegistryProtocol getRegistryProtocol()
public void setCluster(Cluster cluster)
public void setProtocol(Protocol protocol)
public void setRegistryFactory(RegistryFactory registryFactory)
public void setProxyFactory(ProxyFactory proxyFactory)
public int getDefaultPort()
ProtocolgetDefaultPort in interface Protocolpublic Map<URL,NotifyListener> getOverrideListeners()
public <T> Exporter<T> export(Invoker<T> originInvoker) throws RpcException
Protocolexport in interface ProtocolT - Service typeoriginInvoker - Service invokerRpcException - thrown when error occurs during export the service, for example: port is occupiedpublic <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException
Protocolrefer in interface ProtocolT - Service typetype - Service classurl - URL address for the remote serviceRpcException - when there's any error while connecting to the service providerpublic String[] getParamsToRegistry(String[] defaultKeys, String[] additionalParameterKeys)
public void destroy()
ProtocolCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.