Package org.apache.dubbo.rpc.protocol
Class AbstractProxyProtocol
java.lang.Object
org.apache.dubbo.rpc.protocol.AbstractProtocol
org.apache.dubbo.rpc.protocol.AbstractProxyProtocol
- All Implemented Interfaces:
ScopeModelAware,Protocol
AbstractProxyProtocol
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRpcException(Class<?> exception) <T> Exporter<T> Export service for remote invocation:
1.voidsetProxyFactory(ProxyFactory proxyFactory) Methods inherited from class org.apache.dubbo.rpc.protocol.AbstractProtocol
destroy, getExporterMap, getExporters, getServers, refer, setFrameworkModelMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.rpc.Protocol
getDefaultPortMethods inherited from interface org.apache.dubbo.rpc.model.ScopeModelAware
setApplicationModel, setModuleModel, setScopeModel
-
Constructor Details
-
AbstractProxyProtocol
public AbstractProxyProtocol() -
AbstractProxyProtocol
-
-
Method Details
-
addRpcException
-
getProxyFactory
-
setProxyFactory
-
export
Description copied from interface:ProtocolExport 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- Type Parameters:
T- Service type- Parameters:
invoker- Service invoker- Returns:
- exporter reference for exported service, useful for unexport the service later
- Throws:
RpcException- thrown when error occurs during export the service, for example: port is occupied
-