Class AbstractProxyProtocol

java.lang.Object
org.apache.dubbo.rpc.protocol.AbstractProtocol
org.apache.dubbo.rpc.protocol.AbstractProxyProtocol
All Implemented Interfaces:
ScopeModelAware, Protocol

public abstract class AbstractProxyProtocol extends AbstractProtocol
AbstractProxyProtocol
  • Constructor Details

    • AbstractProxyProtocol

      public AbstractProxyProtocol()
    • AbstractProxyProtocol

      public AbstractProxyProtocol(Class<?>... exceptions)
  • Method Details

    • addRpcException

      public void addRpcException(Class<?> exception)
    • getProxyFactory

      public ProxyFactory getProxyFactory()
    • setProxyFactory

      public void setProxyFactory(ProxyFactory proxyFactory)
    • export

      public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException
      Description copied from interface: 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
      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