code: protected RpcInvocation createRpcInvocationMessage(
  			final String methodName,
  			final Class<?>[] parameterTypes,
  			final Object[] args) throws IOException {
  		final RpcInvocation rpcInvocation;
  
  		if (isLocal) {
  			rpcInvocation = new LocalRpcInvocation(
  				methodName,
  				parameterTypes,
  				args);
  		} else {
  			try {
  				RemoteRpcInvocation remoteRpcInvocation = new RemoteRpcInvocation(
  					methodName,
  					parameterTypes,
  					args);
  
  				if (remoteRpcInvocation.getSize() > maximumFramesize) {
  					throw new IOException("The rpc invocation size exceeds the maximum akka framesize.");
  				} else {
  					rpcInvocation = remoteRpcInvocation;
  				}
  			} catch (IOException e) {
  				LOG.warn("Could not create remote rpc invocation message. Failing rpc invocation because...", e);
  				throw e;
  			}
  		}
  
  		return rpcInvocation;
  	}
docs: Create the RpcInvocation message for the given RPC.
  
  @param methodName of the RPC
  @param parameterTypes of the RPC
  @param args of the RPC
  @return RpcInvocation message which encapsulates the RPC details
  @throws IOException if we cannot serialize the RPC invocation parameters