src/main/java/com/alipay/remoting/rpc/RpcRemoting.java
public Object invokeSync(final Connection conn, final Object request,
                             final InvokeContext invokeContext, final int timeoutMillis)
                                                                                        throws RemotingException,
                                                                                        InterruptedException {
        RemotingCommand requestCommand = toRemotingCommand(request, conn, invokeContext,
            timeoutMillis);
        preProcessInvokeContext(invokeContext, requestCommand, conn);
        ResponseCommand responseCommand = (ResponseCommand) super.invokeSync(conn, requestCommand,
            timeoutMillis);
        responseCommand.setInvokeContext(invokeContext);

        Object responseObject = RpcResponseResolver.resolveResponseObject(responseCommand,
            RemotingUtil.parseRemoteAddress(conn.getChannel()));
        return responseObject;
    }
public Object invokeSync(final Connection conn, final Object request,
                             final InvokeContext invokeContext, final int timeoutMillis)
                                                                                        throws RemotingException,
                                                                                        InterruptedException {
        RemotingCommand requestCommand = toRemotingCommand(request, conn, invokeContext,
            timeoutMillis);
        preProcessInvokeContext(invokeContext, requestCommand, conn);
        ResponseCommand responseCommand = (ResponseCommand) super.invokeSync(conn, requestCommand,
            timeoutMillis);
        responseCommand.setInvokeContext(invokeContext);

        Object responseObject = RpcResponseResolver.resolveResponseObject(responseCommand,
            RemotingUtil.parseRemoteAddress(conn.getChannel()));
        return responseObject;
    }
public Object invokeSync ( final Connection conn , final Object request , final InvokeContext invokeContext , final int timeoutMillis ) throws RemotingException , InterruptedException { RemotingCommand requestCommand = toRemotingCommand ( request , conn , invokeContext , timeoutMillis ) ; preProcessInvokeContext ( invokeContext , requestCommand , conn ) ; ResponseCommand responseCommand = ( ResponseCommand ) super . invokeSync ( conn , requestCommand , timeoutMillis ) ; responseCommand . setInvokeContext ( invokeContext ) ; Object responseObject = RpcResponseResolver . resolveResponseObject ( responseCommand , RemotingUtil . parseRemoteAddress ( conn . getChannel ( ) ) ) ; return responseObject ; }
Synchronous rpc invocation.<br>
Notice! DO NOT modify the request object concurrently when this method is called.

@param conn
@param request
@param invokeContext
@param timeoutMillis
@return
@throws RemotingException
@throws InterruptedException
Synchronous rpc invocation . <br > Notice! DO NOT modify the request object concurrently when this method is called .