/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1247 by torben, Tue Dec 21 08:24:19 2010 UTC revision 1248 by torben, Thu Mar 31 17:13:19 2011 UTC
# Line 26  import dk.thoerup.android.traininfo.comm Line 26  import dk.thoerup.android.traininfo.comm
26  import dk.thoerup.circuitbreaker.CircuitBreakerException;  import dk.thoerup.circuitbreaker.CircuitBreakerException;
27  import dk.thoerup.traininfoservice.StationDAO;  import dk.thoerup.traininfoservice.StationDAO;
28  import dk.thoerup.traininfoservice.Statistics;  import dk.thoerup.traininfoservice.Statistics;
29    import dk.thoerup.traininfoservice.banedk.DepartureFetcher.FetchTrainType;
30    
31  /**  /**
32   * Servlet implementation class DepartureServlet   * Servlet implementation class DepartureServlet
# Line 87  public class DepartureServlet extends Ht Line 88  public class DepartureServlet extends Ht
88                  int station = Integer.parseInt( req.getParameter("station") );                  int station = Integer.parseInt( req.getParameter("station") );
89                  String format = req.getParameter("format");                  String format = req.getParameter("format");
90    
91                  DepartureBean beans;                              DepartureBean beans;
92                    
93                    DepartureFetcher.FetchTrainType type = FetchTrainType.BOTH;
94                    if ( req.getParameter("type") != null) {
95                            type = FetchTrainType.valueOf( req.getParameter("type") );
96                    }
97    
98                  try {                  try {
99                          beans = fetcher.cachedLookupDepartures(station, arrival);                          beans = fetcher.cachedLookupDepartures(station, arrival, type);
100                          beans.arrival = arrival;                          beans.arrival = arrival;
101                  } catch (java.io.IOException ioe) {                  } catch (java.io.IOException ioe) {
102                          logger.warning("Read failed, station="+station + ". " + ioe.getMessage() );                          logger.warning("Read failed, station="+station + ". " + ioe.getMessage() );

Legend:
Removed from v.1247  
changed lines
  Added in v.1248

  ViewVC Help
Powered by ViewVC 1.1.20