class RpcClientRemoting extends RpcRemoting {

    public RpcClientRemoting(CommandFactory commandFactory, RemotingAddressParser addressParser,
                             ConnectionManager connectionManager) {
        super(commandFactory, addressParser, connectionManager);
    }

    /**
     * @see com.alipay.remoting.rpc.RpcRemoting#oneway(com.alipay.remoting.Url, java.lang.Object, InvokeContext)
     */
    @Override
    public void oneway(Url url, Object request, InvokeContext invokeContext)
                                                                            throws RemotingException,
                                                                            InterruptedException {
        if (invokeContext == null) {
            invokeContext = new InvokeContext();
        }
        final Connection conn = getConnectionAndInitInvokeContext(url, invokeContext);
        this.connectionManager.check(conn);
        this.oneway(conn, request, invokeContext);
    }

    /**
     * @see com.alipay.remoting.rpc.RpcRemoting#invokeSync(com.alipay.remoting.Url, java.lang.Object, InvokeContext, int)
     */
    @Override
    public Object invokeSync(Url url, Object request, InvokeContext invokeContext, int timeoutMillis)
                                                                                                     throws RemotingException,
                                                                                                     InterruptedException {
        // Use the specified timeout to overwrite the configuration in the url
        url.setConnectTimeout(timeoutMillis);
        if (invokeContext == null) {
            invokeContext = new InvokeContext();
        }
        final Connection conn = getConnectionAndInitInvokeContext(url, invokeContext);
        this.connectionManager.check(conn);
        return this.invokeSync(conn, request, invokeContext, timeoutMillis);
    }

    /**
     * @see com.alipay.remoting.rpc.RpcRemoting#invokeWithFuture(com.alipay.remoting.Url, java.lang.Object, InvokeContext, int)
     */
    @Override
    public RpcResponseFuture invokeWithFuture(Url url, Object request, InvokeContext invokeContext,
                                              int timeoutMillis) throws RemotingException,
                                                                InterruptedException {
        url.setConnectTimeout(timeoutMillis);
        if (invokeContext == null) {
            invokeContext = new InvokeContext();
        }
        final Connection conn = getConnectionAndInitInvokeContext(url, invokeContext);
        this.connectionManager.check(conn);
        return this.invokeWithFuture(conn, request, invokeContext, timeoutMillis);
    }

    /**
     * @see com.alipay.remoting.rpc.RpcRemoting#invokeWithCallback(com.alipay.remoting.Url, java.lang.Object, InvokeContext, com.alipay.remoting.InvokeCallback, int)
     */
    @Override
    public void invokeWithCallback(Url url, Object request, InvokeContext invokeContext,
                                   InvokeCallback invokeCallback, int timeoutMillis)
                                                                                    throws RemotingException,
                                                                                    InterruptedException {
        url.setConnectTimeout(timeoutMillis);
        if (invokeContext == null) {
            invokeContext = new InvokeContext();
        }
        final Connection conn = getConnectionAndInitInvokeContext(url, invokeContext);
        this.connectionManager.check(conn);
        this.invokeWithCallback(conn, request, invokeContext, invokeCallback, timeoutMillis);
    }

    /**
     * @see RpcRemoting#preProcessInvokeContext(InvokeContext, RemotingCommand, Connection)
     */
    @Override
    protected void preProcessInvokeContext(InvokeContext invokeContext, RemotingCommand cmd,
                                           Connection connection) {<FILL_FUNCTION_BODY>}

    /**
     * Get connection and set init invokeContext if invokeContext not {@code null}
     *
     * @param url target url
     * @param invokeContext invoke context to set
     * @return connection
     */
    protected Connection getConnectionAndInitInvokeContext(Url url, InvokeContext invokeContext)
                                                                                                throws RemotingException,
                                                                                                InterruptedException {
        long start = System.currentTimeMillis();
        long startInNano = System.nanoTime();
        Connection conn;
        try {
            conn = this.connectionManager.getAndCreateIfAbsent(url);
        } finally {
            if (null != invokeContext) {
                invokeContext.putIfAbsent(InvokeContext.CLIENT_CONN_CREATETIME,
                    (System.currentTimeMillis() - start));
                invokeContext.putIfAbsent(InvokeContext.CLIENT_CONN_CREATE_START_IN_NANO,
                    startInNano);
                invokeContext.putIfAbsent(InvokeContext.CLIENT_CONN_CREATE_END_IN_NANO,
                    System.nanoTime());
            }
        }
        return conn;
    }
}

        if (null != invokeContext) {
            invokeContext.putIfAbsent(InvokeContext.CLIENT_LOCAL_IP,
                RemotingUtil.parseLocalIP(connection.getChannel()));
            invokeContext.putIfAbsent(InvokeContext.CLIENT_LOCAL_PORT,
                RemotingUtil.parseLocalPort(connection.getChannel()));
            invokeContext.putIfAbsent(InvokeContext.CLIENT_REMOTE_IP,
                RemotingUtil.parseRemoteIP(connection.getChannel()));
            invokeContext.putIfAbsent(InvokeContext.CLIENT_REMOTE_PORT,
                RemotingUtil.parseRemotePort(connection.getChannel()));
            invokeContext.putIfAbsent(InvokeContext.BOLT_INVOKE_REQUEST_ID, cmd.getId());
        }
    
<methods>public void <init>(com.alipay.remoting.CommandFactory) ,public void <init>(com.alipay.remoting.CommandFactory, com.alipay.remoting.RemotingAddressParser, com.alipay.remoting.ConnectionManager) ,public java.lang.Object invokeSync(java.lang.String, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public abstract java.lang.Object invokeSync(com.alipay.remoting.Url, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public java.lang.Object invokeSync(com.alipay.remoting.Connection, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public void invokeWithCallback(java.lang.String, java.lang.Object, com.alipay.remoting.InvokeContext, com.alipay.remoting.InvokeCallback, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public abstract void invokeWithCallback(com.alipay.remoting.Url, java.lang.Object, com.alipay.remoting.InvokeContext, com.alipay.remoting.InvokeCallback, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public void invokeWithCallback(com.alipay.remoting.Connection, java.lang.Object, com.alipay.remoting.InvokeContext, com.alipay.remoting.InvokeCallback, int) throws com.alipay.remoting.exception.RemotingException,public com.alipay.remoting.rpc.RpcResponseFuture invokeWithFuture(java.lang.String, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public abstract com.alipay.remoting.rpc.RpcResponseFuture invokeWithFuture(com.alipay.remoting.Url, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public com.alipay.remoting.rpc.RpcResponseFuture invokeWithFuture(com.alipay.remoting.Connection, java.lang.Object, com.alipay.remoting.InvokeContext, int) throws com.alipay.remoting.exception.RemotingException,public void oneway(java.lang.String, java.lang.Object, com.alipay.remoting.InvokeContext) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public abstract void oneway(com.alipay.remoting.Url, java.lang.Object, com.alipay.remoting.InvokeContext) throws com.alipay.remoting.exception.RemotingException, java.lang.InterruptedException,public void oneway(com.alipay.remoting.Connection, java.lang.Object, com.alipay.remoting.InvokeContext) throws com.alipay.remoting.exception.RemotingException<variables>protected com.alipay.remoting.RemotingAddressParser addressParser,protected com.alipay.remoting.ConnectionManager connectionManager,private static final Logger logger