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
-
Method Summary
Modifier and TypeMethodDescriptionlong
createMovie
(String title, int year) Creates a newMovie
object on the server.void
deleteMovie
(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 theMovie
with the given id.Returns all of the movies in the databasevoid
noteCharacter
(long movieId, String character, long actorId) Makes note of a character in a given movie played by a given actor.void
shutdown()
Unregisters thisMovieDatabase
object with the RMI registry.
-
Field Details
-
RMI_OBJECT_NAME
- See Also:
-
-
Method Details
-
createMovie
Creates a newMovie
object 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 theMovie
with 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 thisMovieDatabase
object 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
-