如何快速学习Java RMI [英] how to learn Java RMI quickly

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

问题描述

我有一个Java应用程序,我已经工作了一两年了。我想创建一个非常简单的集合(可能会增加以后的复杂性),我可以用来从另一个JVM(例如MATLAB)控制我的Java应用程序。

I have a Java application I've been working on for a year or two now. I would like to create a very simple set (with potential to add complexity later) of interfaces that I can use to control my Java app from another JVM (e.g. MATLAB).

我假设RMI是最好的方法,但我不确定,因为我几乎一无所知。

I am assuming RMI is the best way to do this, but I'm not sure, as I know next to nothing about it.

什么是快速学习RMI的最佳方法是什么?

假设我想使用这样的界面:

Let's say I want to use an interface like this:

interface Application {
   public void setLoggingEnabled(boolean enable);
   public boolean isLoggingEnabled();
}

如何使用RMI在这个界面的两个JVM之间实现桥接?我需要了解阻塞/线程/同步才能使其工作?

How could I implement a bridge between the two JVMs with this interface using RMI? What do I have to know about blocking / threading / synchronization to make this work?

推荐答案

开头的好链接:

RMI指南:

http://download.oracle.com/javase/6/docs/technotes/guides/rmi/index。 html

http://download.oracle.com/javase/1.4.2/docs/guide/rmi/

RMI教程:

http://download.oracle.com/javase/tutorial/rmi/index.html

这篇关于如何快速学习Java RMI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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