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 ; }
Create the RpcInvocation message for the given RPC .