JAVA RMI远程调用demo
来源:互联网 发布:黑客用什么系统 知乎 编辑:程序博客网 时间:2024/05/10 17:29
1 创建接口继承 Remote
The Remote
interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine. Any object that is a remote object must directly or indirectly implement this interface. Only those methods specified in a "remote interface", an interface that extends java.rmi.Remote
are available remotely
Implementation classes can implement any number of remote interfaces and can extend other remote implementation classes. RMI provides some convenience classes that remote object implementations can extend which facilitate remote object creation. These classes are java.rmi.server.UnicastRemoteObject
and java.rmi.activation.Activatable
.
Rmote 这个接口是一个标记接口,用来标记一个类的方法可以被非本地的java虚拟机调用。所有的远程调用对象必须直接或间接实现这个接口,只有集成实现了Rmote接口才能被远程调用。
实现类可以实现任意多个远程调用接口,或者继承其他的实现了远程接口的实例。RMI提供了一些辅助类,来帮助创建远程调用类
java.rmi.server.UnicastRemoteObject
UnicastRemoteObject extends RemoteServer
RemoteServer extends RemoteObject
RemoteObject implements Remote, java.io.Serializable
Used for exporting a remote object with JRMP and obtaining a stub that communicates to the remote object. Stubs are either generated at runtime using dynamic proxy objects, or they are generated statically at build time, typically using the rmic
tool.
java.rmi.activation.Activatable
.
The Activatable
class provides support for remote objects that require persistent access over time and that can be activated by the system.
For the constructors and static exportObject
methods, the stub for a remote object being exported is obtained as described injava.rmi.server.UnicastRemoteObject
.
Activatable extends RemoteServer
//占位 后续补充
- JAVA RMI远程调用demo
- Java rmi 远程调用
- JAVA RMI 远程调用
- java--- RMI远程调用
- Java rmi 远程调用
- java rmi 远程调用
- java远程调用RMI
- JAVA RMI远程调用
- java RMI(远程调用)
- RMI java 远程调用
- RMI远程方法调用demo,适合新手
- Java RMI远程方法调用
- Java远程方法调用(RMI)
- Java远程方法调用RMI
- Java Rmi 远程方法调用
- JAVA rmi 远程方法调用
- java rmi远程方法调用
- Java RMI-远程方法调用
- Android LruCache图片缓存使用(二)
- C++实现进制转换(十进制转十六进制)
- Java基础---IO流(上)
- 安卓版本更新
- 杭电1491 Octorber 21st
- JAVA RMI远程调用demo
- 线程池分析与使用
- 关于在js中关闭浏览器页面的问题
- Javascript高级程序设计 第八章 --- DOM
- Android Manifest.xml文件概述
- 如何将硬盘从现有的虚拟机转移到空的虚拟机上?
- iOS tableview header留白,更换header时有留白
- 互联网协议入门(一)
- ios switch中case中声明变量报错“expected expression”