| Modifier and Type | Class and Description |
|---|---|
static class |
RegistryProtocol.InvokerDelegete<T> |
| 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() |
static RegistryProtocol |
getRegistryProtocol() |
<T> Invoker<T> |
refer(Class<T> type,
URL url)
Refer a remote service:
1. |
void |
register(URL registryUrl,
URL registedProviderUrl) |
void |
setCluster(Cluster cluster) |
void |
setProtocol(Protocol protocol) |
void |
setProxyFactory(ProxyFactory proxyFactory) |
void |
setRegistryFactory(RegistryFactory registryFactory) |
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 void destroy()
ProtocolCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.