public class DubboProtocol extends AbstractProtocol
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_PORT |
static String |
NAME |
| 构造器和说明 |
|---|
DubboProtocol() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Destroy protocol:
1. |
<T> Exporter<T> |
export(Invoker<T> invoker)
Export service for remote invocation:
1. |
int |
getDefaultPort()
Get default port when user doesn't config the port.
|
static DubboProtocol |
getDubboProtocol() |
Collection<Exporter<?>> |
getExporters() |
Collection<Invoker<?>> |
getInvokers() |
Collection<ExchangeServer> |
getServers() |
<T> Invoker<T> |
refer(Class<T> serviceType,
URL url)
Refer a remote service:
1. |
public static final int DEFAULT_PORT
public static DubboProtocol getDubboProtocol()
public Collection<ExchangeServer> getServers()
public Collection<Exporter<?>> getExporters()
public Collection<Invoker<?>> getInvokers()
public int getDefaultPort()
Protocolpublic <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
ProtocolT - Service typeinvoker - Service invokerRpcException - thrown when error occurs during export the service, for example: port is occupiedpublic <T> Invoker<T> refer(Class<T> serviceType, URL url) throws RpcException
ProtocolT - Service typeserviceType - Service classurl - URL address for the remote serviceRpcException - when there's any error while connecting to the service providerpublic void destroy()
Protocoldestroy 在接口中 Protocoldestroy 在类中 AbstractProtocolCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.