类 AbstractProtocol

    • 构造器详细资料

      • AbstractProtocol

        public AbstractProtocol()
    • 方法详细资料

      • destroy

        public void destroy()
        从接口复制的说明: Protocol
        Destroy protocol:
        1. Cancel all services this protocol exports and refers
        2. Release all occupied resources, for example: connection, port, etc.
        3. Protocol can continue to export and refer new service even after it's destroyed.
        指定者:
        destroy 在接口中 Protocol
      • refer

        public <T> Invoker<T> refer​(Class<T> type,
                                    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
        参数:
        type - Service class
        url - URL address for the remote service
        返回:
        invoker service's local proxy
        抛出:
        RpcException - when there's any error while connecting to the service provider