接口 Protocol
-
- 所有超级接口:
Protocol
@Deprecated public interface Protocol extends Protocol
已过时。
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 <T> Exporter<T>
export(Invoker<T> invoker)
已过时。default <T> Exporter<T>
export(Invoker<T> invoker)
已过时。Export service for remote invocation:
1.default List<ProtocolServer>
getServers()
已过时。Get all servers serving this protocol<T> Invoker<T>
refer(Class<T> aClass, URL url)
已过时。default <T> Invoker<T>
refer(Class<T> aClass, URL url)
已过时。Refer a remote service:
1.-
从接口继承的方法 org.apache.dubbo.rpc.Protocol
destroy, getDefaultPort
-
-
-
-
方法详细资料
-
export
<T> Exporter<T> export(Invoker<T> invoker) throws RpcException
已过时。- 抛出:
RpcException
-
refer
<T> Invoker<T> refer(Class<T> aClass, URL url) throws RpcException
已过时。- 抛出:
RpcException
-
export
default <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
已过时。从接口复制的说明:Protocol
Export service for remote invocation:
1. Protocol should record request source address after receive a request: RpcContext.getServerAttachment().setRemoteAddress();
2. export() must be idempotent, that is, there's no difference between invoking once and invoking twice when export the same URL
3. Invoker instance is passed in by the framework, protocol needs not to care- 指定者:
export
在接口中Protocol
- 类型参数:
T
- Service type- 参数:
invoker
- Service invoker- 返回:
- exporter reference for exported service, useful for unexport the service later
- 抛出:
RpcException
- thrown when error occurs during export the service, for example: port is occupiedRpcException
-
refer
default <T> Invoker<T> refer(Class<T> aClass, URL url) throws RpcException
已过时。从接口复制的说明:Protocol
Refer a remote service:
1. When user calls `invoke()` method of `Invoker` object which's returned from `refer()` call, the protocol needs to correspondingly execute `invoke()` method of `Invoker` object
2. It's protocol's responsibility to implement `Invoker` which's returned from `refer()`. Generally speaking, protocol sends remote request in the `Invoker` implementation.
3. When there's check=false set in URL, the implementation must not throw exception but try to recover when connection fails.- 指定者:
refer
在接口中Protocol
- 类型参数:
T
- Service type- 参数:
aClass
- Service classurl
- URL address for the remote service- 返回:
- invoker service's local proxy
- 抛出:
RpcException
- when there's any error while connecting to the service providerRpcException
-
getServers
default List<ProtocolServer> getServers()
已过时。从接口复制的说明:Protocol
Get all servers serving this protocol- 指定者:
getServers
在接口中Protocol
- 返回:
-
-