public void callMethod ( final MethodCallInfo info ) { this . logger . info ( "calling remote method " . concat ( info . toString ( ) ) ) ; try ( Socket socket = new Socket ( this . host , this . port ) ) { final ObjectOutputStream out = new ObjectOutputStream ( socket . getOutputStream ( ) ) ; out . writeObject ( info ) ; final ObjectInputStream in = new ObjectInputStream ( socket . getInputStream ( ) ) ; final MethodCallInfo serverCopy = ( MethodCallInfo ) in . readObject ( ) ; info . set ( serverCopy ) ; } catch ( final Exception e ) { throw new RemoteReflectionException ( e ) ; } }
Call the remote method based on the passed MethodCallInfo parameter .