university
Class PersonListImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
university.PersonListImpl
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, PersonList
public class PersonListImpl
- extends java.rmi.server.UnicastRemoteObject
- implements PersonList
PersonListImpl is the server portion of the RMI program that adds a
PersonAdapter to a list of people.
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary |
PersonListImpl()
Creates a new instance of PersonListImpl |
Method Summary |
void |
addPerson(PersonAdapter person)
Adds a person to the remote directory. |
java.lang.String |
ListAll()
Lists all people that are contained in the remote directory. |
static void |
main(java.lang.String[] args)
Main entry point to the server application. |
void |
removePerson(int ID)
Remove a person to the remote directory. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PersonListImpl
public PersonListImpl()
throws java.rmi.RemoteException
- Creates a new instance of PersonListImpl
- Throws:
java.rmi.RemoteException
addPerson
public void addPerson(PersonAdapter person)
throws java.rmi.RemoteException
- Adds a person to the remote directory.
- Specified by:
addPerson
in interface PersonList
- Parameters:
person
- The person to be added to the list.
- Throws:
java.rmi.RemoteException
removePerson
public void removePerson(int ID)
throws java.rmi.RemoteException
- Remove a person to the remote directory.
- Specified by:
removePerson
in interface PersonList
- Parameters:
ID
- The ID number of the person to be removed from the list.
- Throws:
java.rmi.RemoteException
ListAll
public java.lang.String ListAll()
throws java.rmi.RemoteException
- Lists all people that are contained in the remote directory.
- Specified by:
ListAll
in interface PersonList
- Returns:
- String a string listing all people in the list.
- Throws:
java.rmi.RemoteException
main
public static void main(java.lang.String[] args)
- Main entry point to the server application.