论文题目: 基于远程方法调用的聊天室软件设计与实现
目 录
摘要 .............................................................. Ⅰ Abstract........................................................... Ⅱ 1 开发工具和环境.................................................... 6
1.1简介......................................................... 6 1.2开发技术的介绍............................................... 7
1.2.1开发语言 ............................................... 7 1.2.2开发技术 ............................................... 7 1.2.3客户端/服务器端体系结构 ................................ 8 1.2.4 Java IO简介 .......................................... 9 1.2.5 MySql介绍 ............................................. 9 1.2.6 TCP/IP................................................ 9 1.2.7TCP/IP主要的三个层面的功能 ........................... 10 1.3开发及软件测试环境.......................................... 10
1.3.1软件环境 .............................................. 10 1.3.2开发、测试硬件环境 .................................... 10 1.4本章小结.................................................... 11 2需求分析和可行性分析 ............................................. 11
2.1需求分析和可行性分析....................................... 11
2.1.1聊天软件的功能需求 ................................... 11 2.1.2软件运行需求 .......................................... 11 2.2本章小结.................................................... 12 3.UML建模 ........................................................ 12
3.1系统的模块用例.............................................. 12
3.1.1聊天室各个模块儿用例图 ................................ 12 3.1.2 协作图................................................ 13 3.3可行性分析.................................................. 14
3.3.3 操作可行性............................................ 15 3.3.4经济可性 .............................................. 15 3.3.5结论 .................................................. 15
4软件的设计 ....................................................... 15
4.1软件概述.................................................... 15 4.2软件的总体设计与功能........................................ 16 4.3服务器端设计与功能。........................................ 16
4.3.1服务器端的详细介绍 .................................... 17 4.3.2客户端程序介绍 ........................................ 17 4.4本章小结.................................................... 18 5.软件的主要设计实现............................................... 18
5.1软件开发环境的搭建.......................................... 18 5.2软件实现思路................................................ 18
5.2.1服务器端设计 .......................................... 18 5.2.2客户端设计 ............................................ 21 5.2.3聊天信息存储 .......................................... 26 5.3本章小结.................................................... 29 6.软件测试......................................................... 29
6.1软件测试.................................................... 30
6.1.1 操作系统测试.......................................... 30 6.2本章小结.................................................... 30 谢辞............................................................... 32
基于远程方法调用的聊天室软件设计与实现
摘要:随着经济、文化、经济乃至整个社会的方方面面的高速度发展,社
会对计算机技术的需求也越来越大,要求越来高。有远程化的社会需求、对框架结构和服务平台集成化的需求、操作维护迅捷化的需求。于是远程化的方法越来越受到社会的欢迎。
在互联网快速发展的大背景下,计算机逐渐的走进了千家万户,越来越小的体积是的计算机越来越容易携带,远程协助系统的作用得到了体现和发挥,远程聊天越来越受到人们的关注和推崇,远程聊天是人们最为关注的远程应用,远程聊天软件所带来的方便是众所周知的,远程会议,远程沟通等等,因为远程聊天的出现大大减少了这些工作所带来的人力物力的消耗,即能够减轻对资源的消耗,也能保证效率的提高,在各个方面上得到了较好的应用。在Java平台上可以实现对象的传递、平台无关等特征。基于Java RMI技术的远程辅助系统运用的越来越广泛,本次做的设计主要是RMI的远程通讯。RMI(Remote Method Invoke, 远程方法调用)是Java为了方便网络通讯的一种机制。它允许某个Java虚拟机上的类调用另外一个Java虚拟机的类的方法。 这两个Java虚拟机既可以在同一台机器上,也可以在不同机器上。RMI隐藏了具体的网络通讯的细节。 使得“访问远程主机上的对象如同访问本地对象”。使得用户完全不需要考虑具体的网络通讯细节。通过利用远程通讯工作,在现在的生活以及工作中提供了极大的方便,缓解了紧张的交通,降低了环境的污染,免去了道路上的奔波,提高了工作效率,更好的提高工作效率。
类似于当下的许多聊天工具Netmeeting、MSN-Message、腾讯QQ等等。此次设计的聊天室工具引用了基于C/S架构的JAVA RMI技术的远程协助协同。服务器端(Server)启动后等待客户端(Client)连接,当客户端和服务器端建立有效连接之后就可以进行有效的通信,并且具备对聊天信息保存的功能,便于再次查找。
关键词: 互联网 RMI 远程调用
The design of chatting room software base on Java RMI
Abstract:All industries of the world are developing with high
speed,meanwhile,larger demand and more strict requirement of computer technology were asked.All these requirement including Remote control、The frame structure and integrated service platform、Operation and maintenance easily. So Remote control is more and more popular. At the background of quickly development of Internet, computers become essential part of our life, Smaller volume of computer make it easy for us to take it and remote assistant system become more and more important. On the JAVA development plantform,we can convey object and run the program on other developing platform. Remote assistance system base on RMI is used in many filed.This time I mainly work for remote communication basic on JAVA RMI. RMI (Remote Method Invoke remote method invocation) Java is a convenient mechanism for network communication, It allows a Java virtual machine class calls another method of Java virtual machine class. The two Java virtual machine can be used on the same machine, can also be on different machines. RMI hides the details of the specific communication network. The access object on the remote host as access to local objects. The user does not need to consider the specific details of the communication network.The technology which basic on remote provide lost
of
convenient,
easing
traffic,reducing
environment
polluting,improving Efficiency and so on.
The same as current chatting tools like Netmeeting、MSN-Message、TencentQQ etc.The design is based on C/S fram assistented with JAVA RMI.When Server start,it will waiting Client to contact with it.On the other hand ,messages can be stored,we can check some former chatting messages.
Key words:Internet;RMI;Remote call