001package edu.pdx.cs410J.whitlock.server;
002
003import com.google.gwt.user.server.rpc.RemoteServiceServlet;
004import edu.pdx.cs410J.whitlock.client.Appointment;
005import edu.pdx.cs410J.whitlock.client.AppointmentBook;
006import edu.pdx.cs410J.whitlock.client.AppointmentBookService;
007
008/**
009 * The server-side implementation of the division service
010 */
011public class AppointmentBookServiceImpl extends RemoteServiceServlet implements AppointmentBookService
012{
013  @Override
014  public AppointmentBook createAppointmentBook(int numberOfAppointments) {
015    AppointmentBook book = new AppointmentBook();
016    for (int i = 0; i < numberOfAppointments; i++) {
017      book.addAppointment(new Appointment());
018    }
019    return book;
020  }
021
022  @Override
023  protected void doUnexpectedFailure(Throwable unhandled) {
024    unhandled.printStackTrace(System.err);
025    super.doUnexpectedFailure(unhandled);
026  }
027
028}