通过RMI传输Java文件 [英] Java file transfer over RMI

查看:260
本文介绍了通过RMI传输Java文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过RMI传输文件的最简单方法是什么?

What is the easiest way to transfer files over RMI ?

推荐答案

对于此应用程序,RMI是一个糟糕的选择。如果使用多个方法调用,则隐式数据复制过多,延迟太多。

RMI is a poor choice for this application. There is too much implicit data copying, and too much latency if you use multiple method calls.

使用套接字或HTTP连接。有关通用解决方案,请参阅此问题中的答案。

Use a socket or an HTTP connection. See my answer in this question for a general-purpose solution.

我不知道为什么你如此专注于使用RMI。你已经发布了六个问题,你已经多次被告知,例如现已删除的此处,它不适用,或者是您声明的过载避免策略的一部分。

I don't know why you are so fixated on using RMI for this. You've posted half a dozen questions on it, and you've already been told several times, e.g. now-deleted here, that it isn't suitable, or part of an overload avoidance strategy as you claimed.

这篇关于通过RMI传输Java文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆