Package edu.pdx.cs410J.family
Class RemotePersonImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.pdx.cs410J.family.RemotePersonImpl
- All Implemented Interfaces:
RemotePerson,Serializable,Remote
This is a concrete class that implements the
RemotePerson interface. It delegates most of its
functionality to an underlying Person object.
Note that because this class is only executed on the
server-side, it does not have to be public. However, the fact that
it is a UnicastRemoteObject allows the client to
execute its methods remotely.
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
ConstructorsConstructorDescriptionRemotePersonImpl(RemoteFamilyTree tree, Person person) Creates a newRemotePersonImplthat delegates most of its behavior to a givenPerson. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwoRemotePersonImpls are considered equal if their underlying persons have the same id.Returns this person's date of birthReturns this person's date of deathReturns a string describing this personintReturns the id of this person's fatherReturns this person's first nameReturns this person's gender (eitherPerson.MALEorPerson.FEMALE.intgetId()Returns this person's unique idReturns this person's last nameReturns this person's middle nameintReturns the id of this person's mothervoidsetDateOfBirth(Date dob) Sets this person's date of birthvoidsetDateOfDeath(Date dod) Sets this person's date of deathvoidsetFatherId(int fatherId) Sets the id of this person's fathervoidsetFirstName(String firstName) Sets this person's first namevoidsetLastName(String lastName) Sets this person's last namevoidsetMiddleName(String middleName) Sets this person's middle namevoidsetMotherId(int motherId) Sets the id of this person's motherMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
getRef, hashCode, toString, toStub
-
Constructor Details
-
RemotePersonImpl
RemotePersonImpl(RemoteFamilyTree tree, Person person) throws RemoteException Creates a newRemotePersonImplthat delegates most of its behavior to a givenPerson.- Throws:
RemoteException
-
-
Method Details
-
getId
Description copied from interface:RemotePersonReturns this person's unique id- Specified by:
getIdin interfaceRemotePerson- Throws:
RemoteException
-
getGender
Description copied from interface:RemotePersonReturns this person's gender (eitherPerson.MALEorPerson.FEMALE.- Specified by:
getGenderin interfaceRemotePerson- Throws:
RemoteException
-
getFirstName
Description copied from interface:RemotePersonReturns this person's first name- Specified by:
getFirstNamein interfaceRemotePerson- Throws:
RemoteException
-
setFirstName
Description copied from interface:RemotePersonSets this person's first name- Specified by:
setFirstNamein interfaceRemotePerson- Throws:
RemoteException
-
getMiddleName
Description copied from interface:RemotePersonReturns this person's middle name- Specified by:
getMiddleNamein interfaceRemotePerson- Throws:
RemoteException
-
setMiddleName
Description copied from interface:RemotePersonSets this person's middle name- Specified by:
setMiddleNamein interfaceRemotePerson- Throws:
RemoteException
-
getLastName
Description copied from interface:RemotePersonReturns this person's last name- Specified by:
getLastNamein interfaceRemotePerson- Throws:
RemoteException
-
setLastName
Description copied from interface:RemotePersonSets this person's last name- Specified by:
setLastNamein interfaceRemotePerson- Throws:
RemoteException
-
getFatherId
Description copied from interface:RemotePersonReturns the id of this person's father- Specified by:
getFatherIdin interfaceRemotePerson- Throws:
RemoteException
-
setFatherId
Description copied from interface:RemotePersonSets the id of this person's father- Specified by:
setFatherIdin interfaceRemotePerson- Throws:
RemoteException
-
getMotherId
Description copied from interface:RemotePersonReturns the id of this person's mother- Specified by:
getMotherIdin interfaceRemotePerson- Throws:
RemoteException
-
setMotherId
Description copied from interface:RemotePersonSets the id of this person's mother- Specified by:
setMotherIdin interfaceRemotePerson- Throws:
RemoteException
-
getDateOfBirth
Description copied from interface:RemotePersonReturns this person's date of birth- Specified by:
getDateOfBirthin interfaceRemotePerson- Throws:
RemoteException
-
setDateOfBirth
Description copied from interface:RemotePersonSets this person's date of birth- Specified by:
setDateOfBirthin interfaceRemotePerson- Throws:
RemoteException
-
getDateOfDeath
Description copied from interface:RemotePersonReturns this person's date of death- Specified by:
getDateOfDeathin interfaceRemotePerson- Throws:
RemoteException
-
setDateOfDeath
Description copied from interface:RemotePersonSets this person's date of death- Specified by:
setDateOfDeathin interfaceRemotePerson- Throws:
RemoteException
-
getDescription
Description copied from interface:RemotePersonReturns a string describing this person- Specified by:
getDescriptionin interfaceRemotePerson- Throws:
RemoteException
-
equals
TwoRemotePersonImpls are considered equal if their underlying persons have the same id.- Overrides:
equalsin classRemoteObject
-