类 AbstractProxyProtocol

    • 构造器详细资料

      • AbstractProxyProtocol

        public AbstractProxyProtocol()
      • AbstractProxyProtocol

        public AbstractProxyProtocol​(Class<?>... exceptions)
    • 方法详细资料

      • addRpcException

        public void addRpcException​(Class<?> exception)
      • setProxyFactory

        public void setProxyFactory​(ProxyFactory proxyFactory)
      • export

        public <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
        类型参数:
        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 occupied