nathan.middleware
Class Client

java.lang.Object
  extended by nathan.middleware.Client

public class Client
extends java.lang.Object

Client is the client portion of the RMI application. The client application uses stub objects to invoke methods on remote objects. The application is used to access a remote student list.

To run the client: Client [Service Name] [Regisrty IP] [Registry Port].

Service Name is the name of the remote object which is wished to be used.
Registry IP is the IP of the registry that is used to locate a reference to a remote object.
Registry Port is the port number that the registry is listening on.

Author:
Nathan Balon
Advance Operating Systems CIS 578
University of Michigan Dearborn
Remote Method Invocation Middleware Project

Constructor Summary
Client()
          Creates a new instance of the client object.
Client(java.lang.String serviceName, java.lang.String registryIP, int registryPort)
          Creates a new client object.
 
Method Summary
 void addStudent()
          addStudent add a student to remote list of students on the server.
 void deleteStudent()
          Deletes a student from the server.
 void displayMenu()
          Displays the menu of availiable options to the user.
 Student find()
          Find returns a students from the server.
 void getGrade()
          Gets the grades of a student on the server and displays them.
 StudentList getStub()
          getStub is used to look up a reference to a stub when the application is using more than one remote object.
 void listAllStudents()
          Lists all students that are on the server.
 void lookupReference()
          lookupReference is used to allow the user to lookup a new remote object to use in the application.
static void main(java.lang.String[] args)
          Main entry point to the client application
 void runProgram()
          Runs the application.
 void setGrade()
          Sets the grade of a student on the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Creates a new instance of the client object.


Client

public Client(java.lang.String serviceName,
              java.lang.String registryIP,
              int registryPort)
Creates a new client object.

Parameters:
serviceName - The name of the service
registryIP - The ip address of the registry.
registryPort - The port number of the registry.
Method Detail

getStub

public StudentList getStub()
getStub is used to look up a reference to a stub when the application is using more than one remote object.

Returns:
StudentList The stub to be used by the application.

lookupReference

public void lookupReference()
lookupReference is used to allow the user to lookup a new remote object to use in the application. So the client is able to access multiple remote objects in the application.


displayMenu

public void displayMenu()
Displays the menu of availiable options to the user.


deleteStudent

public void deleteStudent()
Deletes a student from the server.


listAllStudents

public void listAllStudents()
Lists all students that are on the server.


find

public Student find()
Find returns a students from the server.

Returns:
Student the student found on the server.

setGrade

public void setGrade()
Sets the grade of a student on the server.


getGrade

public void getGrade()
Gets the grades of a student on the server and displays them.


addStudent

public void addStudent()
addStudent add a student to remote list of students on the server.


runProgram

public void runProgram()
Runs the application.


main

public static void main(java.lang.String[] args)
Main entry point to the client application

Parameters:
args - The command line arguments supplied by the user.