RMI多个客户端 [英] RMI multiple clients

查看:155
本文介绍了RMI多个客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RMI是否自己处理多个客户端? ie

Does RMI handles multiple clients by itself? i.e.


  1. 是否可以同时使用多个客户的服务器功能?

  2. 如果不是,我该怎么做呢?

  3. 如果是,它是如何工作的?它为每个调用创建一个新线程吗?如果一个客户端阻止该功能,下一个客户端会发生什么?等等。

  1. is it possible to use a server function by multiple clients at the same time?
  2. if no, how can I do such a thing?
  3. if yes, how it works? does it make a new thread for each call? if one clients blocks the function what would happen with the next client? etc.


推荐答案


它是如何工作的?它为每个电话创建一个新线程吗?如果一个客户端阻止该功能,下一个客户端会发生什么?等等。

how it works? does it make a new thread for each call? if one clients blocks the function what would happen with the next client? etc.

它为每个客户端连接创建一个线程。

It creates a thread for each client connection.

如果一个客户端调用一个synchronized方法或一个阻止其他调用的方法,其他线程调用将阻塞,直到该调用释放资源。

If one client calls a synchronized method or one which blocks other calls, calls made by other threads will block until that call releases the resource.

听起来你已经解决了答案,你有更具体的疑问吗?

It sounds like you already worked out the answers, do you have a more specific doubt?

这篇关于RMI多个客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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