[JAVA_RMI] (6) Make a command line navigation menu

[JAVA_RMI] (6) Make a command line navigation menu

Algorithm language 3 years ago (2015-06-12) Views: 1 Comments: 0

Because it is inconvenient to add running parameters in the eclipse running configuration, it is recommended to export the debugged java project as a jar package that can be run. Then open the jar in the command line and use the "java -jar <package name> <main function. Parameter 1 Parameter 2 ......> ". The help command in the figure below is the first element arg[0] of the parameter array arg[] when the main function is executed.The parameters are separated by spaces, followed by arg[1], arg[2]. Knowing this, making a java command line navigation menu is simple.In order to facilitate the operation, the extremely guest also produced a GUI for this experiment, supporting GUI, command line dual interface mode operation and application.The benefits of the command line may only be understood by programmers. Its greatest benefit, personally believed, is that it can be batched. This is something that GUI users cannot understand. Effect preview: MeetingClient.java The following code performs the methods defined in the previous article by matching the main function parameters entered by the user.Entering the GUI and not entering parameters will start the GUI mode.   Series links: SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs SSD8_Ex3[JAVA_RMI](2)

SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition

SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition

Algorithm language computer technology 3 years ago (2015-06-12) Views: 1 Comments: 0

The following code is the key to the use of the database to achieve RMI meeting management in this experiment. The main method is to implement database connection and implement related query methods. These methods have been stated in the previous article's interface code, but there is no substance.The RmiDataBase class inherits the meetinginterface interface. Series links: SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service SSD8_Ex3 [JAVA_RMI] (4) conference database table SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition SSD8_Ex3 [JAVA_RMI] (6) Create Command Line Navigation Menu RmiDataBase.java     Custom exception handling class: BYException.java      

SSD8_Ex3 [JAVA_RMI] (4) conference database table

SSD8_Ex3 [JAVA_RMI] (4) conference database table

Algorithm language Technical application 3 years ago (2015-06-11) Views: 7 Comments: 0

In order to better manage meetings and perform deletion, addition, and query operations more efficiently, this SSD8_Ex3 [JAVA_RMI], the Extreme Guest combined with database system knowledge, decided to use the database to manage the meeting.Because each topic of this exercise is a typical database problem, although it is placed on the network and distributed computing courses. Series links: SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service SSD8_Ex3 [JAVA_RMI] (4) conference database table SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition SSD8_Ex3 [JAVA_RMI] (6) Create Command Line Navigation Menu   Conference database rmimeeting build table Database name: rmimeeting Create three items: users, meeting, meetingrecord rmimeetingER diagram Table statement  

SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service

SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service

Algorithm language computer technology 3 years ago (2015-06-10) Views: 15 Comments: 0

This step is to create an instance of the remote object registry Registry on the local host, and specify the port 8888, this step is essential (Java default port is 1099), an indispensable step, the lack of registry creation, then Unable to bind object to remote registry.After running, open the RMI service. The client must be consistent with the service address. Series links: SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service SSD8_Ex3 [JAVA_RMI] (4) conference database table SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition SSD8_Ex3 [JAVA_RMI] (6) Create Command Line Navigation Menu MeetingServer.java  

SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration

SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration

Algorithm language computer technology 3 years ago (2015-06-10) Views: 7 Comments: 0

Series links: SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs SSD8_Ex3[JAVA_RMI](2) Remote Interface Declaration SSD8_Ex3 [JAVA_RMI] (3) Open RMI Service SSD8_Ex3 [JAVA_RMI] (4) conference database table SSD8_Ex3 [JAVA_RMI] (5) database connection and meeting method definition SSD8_Ex3 [JAVA_RMI] (6) Create Command Line Navigation Menu   The remote interface declaration, this type of server and the code and the client must be consistent.The client implements the content of the specific method on the server side by calling the interface and binding the remote object.Only relevant methods are defined in the interface and no method implementation is performed. MeetingInterface.java  

SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs

SSD8_Ex3 [JAVA_RMI Service] (1) Overview of RMI and Network APIs

Algorithm language 3 years ago (2015-06-07) Views: 4 Comments: 0

RMI and Network APIs On the weekend, EX3-java, a network and distributed system experiment, implemented the RMI distributed agenda service.The full name of RMI is "Remote Method Invocation."The following is the understanding of the extreme guests: the use of RMI remote method calls, you can achieve a java client to the java RMI server to remotely call the other side of the method, these methods in the server-side declaration and concrete implementation, and only the client The definition of the method and the content of the method without implementation - that is a JAVA interface.Java clients that do not have these methods can obtain remote server-side objects over a network connection and then invoke and manipulate remote objects and methods.In other words, the client's method is defined locally, but the actual implementation is based on the "personal" server connected to the Internet. The JAVA RMI saves a lot of code for the client, but it can also be for the server. Data openness provides another kind of connection query interface. For example, many API services on the Internet are in the form of PHP+JSON. After a URL request, the server queries related results and returns it to the client in

SSD8_Exam1[TCP Chat Server]

SSD8_Exam1[TCP Chat Server]

Algorithm language 3 years ago (2015-05-29) Views: 1 Comments: 0

This is Exam1 for SSD8 practice. It is expected that the extreme guests will write a series. The update frequency will be synchronized with the 2013 level progress of the NWPU Network and Distributed Computing Lab.Click on the tag or search for "SSD8" on this site to get updated SSD8 answers.The previous exercise: SSD8_EX2 [UDP vs TCP]; if you want to continue tracking SSD practice, it is recommended to subscribe to this site. This exercise uses a multi-threaded, TCP communication protocol to create a multi-user chat software, which broadcasts user online and offline messages and normal exchange information to all connected users.The main idea of ​​the very guest is to create a hash map of the socket, traverse the hashmap and communicate with many clients. First, the experimental topics According to the list of chat protocols given below, use Java sockets to implement a simple TCP chat server.The server should have the following features: Reading information from each client (2); Can forward the read information to all clients; 3. Obtain the port information through the command line; 4. Listen for specific port (port) request information; 5. Ability to handle concurrent connections, which requires the use of multiple threads to handle

SSD8_EX2[UDP vs TCP]

SSD8_EX2[UDP vs TCP]

computer technology 3 years ago (2015-05-22) Views: 0 Comments: 0

This is the EX2 of SSD8 practice. It is expected that the extreme guests will write a series. This series is entirely personalized by Wang Baiyuan and the update frequency will be synchronized with the 2013 level of the NWPU database system experimental class.Click on the tag or search for "SSD8" on this site to get updated SSD8 answers.The previous exercise: SSD8_EX1 [Java implementation code for Socket Communications]; if you want to continue tracking SSD practice, it is recommended to subscribe to this site. Brief description of the problem Write a simple datagram program based on C/S (client/server) mode in Java.The client sets a timer. After the timer starts, it sends a one-byte packet to the server using UDP and TCP, respectively, and waits for the server to return a message.Calculate the average round trip time, calculate the number of packet loss during UDP transmission and implement packet loss retransmission. First, using UDP to achieve packet loss retransmission, packet loss count and transmission timing 1.UDP server program UDPServer.java   2.UDP client program UDPClient.java   Second, using TCP to achieve transmission timing 1.TCP server program TcpServer.java   2 based on the TCP protocol client class  

SSD8_EX1 [socket communication java implementation code]

SSD8_EX1 [socket communication java implementation code]

Problem Overview Implement the EchoServer and EchoClient classes, where EchoServer listens on a port number (passed through parameters when it starts) and waits for client access; EchoClient connects to the server based on the incoming server address (IP address or domain name) and port number at startup; After connecting, read the user's input on the command line and transfer the input to EchoServer. After EchoServer is received, return EchoServer received: + user input information; EchoClient receives the return message and outputs it to the command line, and continues. Waiting for user input 1, the client EchoClient.java code   2. Single-threaded server-side EchoServer.java code 3, multi-threaded server-side code ThreadEchoServer.java: Handler.java  

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW