`

SSD08 Exercise04 个人解答

阅读更多

RMI Distributed Agenda Service

  • Background
  • Tasks
  • Interface
  • Submission
Readings:
  • Reilly and Reilly, Chapter 11

Background

Build a distributed shared agenda service using Java RMI. Various clients should be able to connect to the shared agenda to query, add, and delete meetings. The server should also have management functionality that allows registration and clearing meetings.

Tasks

Your agenda service should implement the following functionality. Each piece of functionality outlined below must be accessible from the client and be run by the server.

User Registration
New users may register. New users must supply a user name and a password. If the supplied user name is already in use by some other user, print an error message. Upon successful registration, print a message stating so.
Adding Meetings
Registered users may add meetings to their agenda. Meetings must be called between two registered users. A user may not create a meeting without another user. Parameters should include the start and end times, a label, and the name of the user with whom the meeting is held. When a meeting is added, it must appear in the agenda of the user who added it as well as in the agenda of the user with whom the meeting is held. A user may not double book another user — if a user already has a meeting that overlaps with a new meeting, an error should be raised, and no meeting should be added to the agenda. The user should receive a message indicating a successful addition or an error if one occurs.
Querying Meetings
Registered users may look up all meetings in their agenda in a given interval of time. The parameters should include the start and end times of the search interval. Return a list of the entries found in the specified time range. In the list, include the start time, end time, label, and the name of the user with whom the meeting is held. You should include meetings that the user has called as well as meetings for which the user has been registered.
Deleting Meetings
Registered users may delete entries that they have created. The parameters should uniquely identify the entry to be deleted as well as the user who is performing the deletion.
 
Clearing Meetings
Registered users may clear all meetings they have called.

Interface

Write a command-line client that accesses your agenda server. The client must be accessible from command line parameters and via a menu. To access the client via a menu, it must be run as java [clientname] [servername] [portnumer] where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, and [portnumer] is the port on which the rmiregistry service is running. It is up to you to design an appropriate menu driven interface. To access the above functionality from the command line, assume that the following parameters must be provided to the client.

java [clientname] [servername] [portnumber] register [username] [password]
Where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, [portnumber] is the port on which rmiregistry is running, [username] is the log in name chosen by the user, and [password] is the user's chosen password.


java [clientname] [servername] [portnumber] add [username] [password] [otherusername] [start] [end] [title]
Where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, [portnumber] is the port on which rmiregistry is running, [username] is the log in name chosen by the user, [password] is the user's chosen password, [otherusername] is the name of the user who the meeting is scheduled with, [start] is the start time of the meeting, [end] is the end time of the meeting, and [title] is the meeting's title.


java [clientname] [servername] [portnumber] query [username] [password] [start] [end]
Where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, [portnumber] is the port on which rmiregistry is running, [username] is the log in name chosen by the user, [password] is the user's chosen password, [start] and [end] represent the time interval of interest.


java [clientname] [servername] [portnumber] delete [username] [password] [meetingid]
Where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, [portnumber] is the port on which rmiregistry is running, [username] is the log in name chosen by the user, [password] is the user's chosen password, and [meetingid] is the identifier of the meeting to be deleted from the agenda.


java [clientname] [servername] [portnumber] clear [username] [password]
Where [clientname] is the name of your client program, [servername] is the name of the machine where the server is running, [portnumber] is the port on which rmiregistry is running, [username] is the log in name chosen by the user, and [password] is the user's chosen password. The given user's agenda must be cleared with this command.

Submission

Coding Style and Documentation

You are expected to design classes in an object-oriented manner using good programming practices.

Your code must be written using Java coding conventions . Your code must be well documented and contain a README file with instructions on compiling and running each program.

 

The files you should turn in are listed below.

  • All files necessary to run your agenda service
  • A README file

To help yourself do your best on this assessment, consult this general list of grading guidelines.

分享到:
评论
3 楼 qianjigui 2009-06-11  
Feedback for SSD8 RMI Distributed Agenda Service (v2.0)
Total Score: 100/100
Good work.
2 楼 qianjigui 2009-05-21  
感谢这个帖子
JAVA RMI 快速入门实例
1 楼 qianjigui 2009-05-21  
请在设置RMI服务端的端口时使用
1099

相关推荐

    SSD06 Exercise04 个人解答

    标题 "SSD06 Exercise04 个人解答" 暗示这可能是一个关于软件开发或编程练习的解答,特别是涉及到性能分析或者优化的环节。描述中的 "NULL" 没有提供额外的信息,但我们可以从标签 "源码" 和 "工具" 中推测,这个...

    SSD04 Exercise04 个人解答

    【标题】"SSD04 Exercise04 个人解答"主要涵盖了两个关键知识点:源码理解和工具使用。在这个练习中,作者分享了他们对于特定编程问题的解决方案,可能涉及编程语言的深入理解、代码调试技巧以及如何有效地利用开发...

    SSD04 Exercise06 个人解答

    标题“SSD04 Exercise06 个人解答”暗示了一个编程练习或项目,其中涉及到对Microsoft Calendar Control 10.0的使用。这个控制组件通常用于Windows应用程序开发,特别是使用Visual Basic 6 (VB6) 或其他支持ActiveX...

    SSD04 Exercise03 个人解答

    【标题】"SSD04 Exercise03 个人解答"主要涵盖了两个关键概念:源码分析和工具使用。这可能是某个课程或项目中的一个练习,其中"SSD04"可能代表课程编号或者阶段,而"Exercise03"则指示这是第三次实践任务。解答者...

    SSD06 Exercise02 个人解答

    【标题】"SSD06 Exercise02 个人解答"主要涵盖了两个关键概念:源码分析和工具使用。这可能是某个课程或项目练习的一部分,其中作者Qianjigui分享了他在解决特定编程问题或实现某功能时的经验和理解。 在源码分析...

    SSD06 Exercise05 个人解答

    【标题】"SSD06 Exercise05 个人解答"主要涵盖了两个关键知识点:源码分析和工具使用。在这个练习中,作者分享了他对某个特定编程问题或项目的解答,这通常涉及深入理解代码的运作机制,包括算法、数据结构以及编程...

    SSD04 Exercise08 个人解答

    【SSD04 Exercise08 个人解答】 在这个学习实践中,我们主要关注的是与源码分析和工具使用相关的知识。这个题目可能源自于一个软件开发或计算机科学的课程,其中"SSD04"可能是课程代码,而"Exercise08"指的是第八个...

    SSD04 Exercise01 个人解答

    这是我的解答 博文链接:https://qianjigui.iteye.com/blog/248917

    SSD06 Exercise03 个人解答

    标题“SSD06 Exercise03 个人解答”暗示了一个编程练习或课程作业,其中可能涉及 SSD(固态存储)相关的技术,而 Exercise03 可能是该系列练习中的第三个部分。描述提到的“Ubuntu8.04+Gcc+Gdb”是一个古老的Linux...

    SSD04 Exercise05 个人解答

    【标题】"SSD04 Exercise05 个人解答"主要涵盖了两个核心知识点:源码分析和工具使用。在这个练习中,作者分享了他对某个特定编程问题或项目的解答,这通常涉及到深入理解代码的运作机制,包括算法、数据结构以及...

    SSD06 Exercise01 个人解答

    NULL 博文链接:https://qianjigui.iteye.com/blog/256678

    SSD04 Exercise02 个人解答

    我的解答 博文链接:https://qianjigui.iteye.com/blog/248918

Global site tag (gtag.js) - Google Analytics