Package edu.pdx.cs410J.rmi
Interface MovieDatabase
- All Superinterfaces:
Remote
- All Known Implementing Classes:
MovieDatabaseImpl
This remote interface allows a client to interact with a database
of
Movie objects.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongcreateMovie(String title, int year) Creates a newMovieobject on the server.voiddeleteMovie(long movieId) executeQuery(Query query, Comparator<Movie> sorter) Performs a query on the database.getFilmography(long actorId) Returns the movie in which a given actor acted.getMovie(long id) Returns theMoviewith the given id.Returns all of the movies in the databasevoidnoteCharacter(long movieId, String character, long actorId) Makes note of a character in a given movie played by a given actor.voidshutdown()Unregisters thisMovieDatabaseobject with the RMI registry.
-
Field Details
-
RMI_OBJECT_NAME
- See Also:
-
-
Method Details
-
createMovie
Creates a newMovieobject on the server. It returns the id of the movie that was created.- Parameters:
title- The title of the movieyear- The year in which the movie was released- Throws:
RemoteException
-
getMovie
Returns theMoviewith the given id.- Throws:
RemoteException
-
noteCharacter
Makes note of a character in a given movie played by a given actor.- Throws:
IllegalArgumentException- The character is already played by someone elseRemoteException
-
getFilmography
Returns the movie in which a given actor acted. The movies are sorted by release date.- Throws:
RemoteException
-
executeQuery
Performs a query on the database. The movies that match the query are sorted using the given comparator.- Throws:
RemoteException
-
shutdown
Unregisters thisMovieDatabaseobject with the RMI registry. Once it is unregistered, this object will no longer be accessible.- Throws:
RemoteException
-
getMovies
Returns all of the movies in the database- Throws:
RemoteException
-
deleteMovie
- Throws:
RemoteException
-