23 |
|
|
24 |
import dk.thoerup.circuitbreaker.CircuitBreakerException; |
import dk.thoerup.circuitbreaker.CircuitBreakerException; |
25 |
import dk.thoerup.traininfoservice.StationDAO; |
import dk.thoerup.traininfoservice.StationDAO; |
26 |
|
import dk.thoerup.traininfoservice.Statistics; |
27 |
|
|
28 |
/** |
/** |
29 |
* Servlet implementation class DepartureServlet |
* Servlet implementation class DepartureServlet |
49 |
} |
} |
50 |
|
|
51 |
@Override |
@Override |
52 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
53 |
if (req.getParameter("station") == null) { |
if (req.getParameter("station") == null) { |
54 |
resp.sendError(400, "not enough parameters"); |
resp.sendError(400, "not enough parameters"); |
55 |
return; |
return; |
56 |
} |
} |
57 |
|
Statistics.getInstance().incrementDepartureLookups(); |
58 |
|
|
59 |
int station = Integer.parseInt( req.getParameter("station") ); |
int station = Integer.parseInt( req.getParameter("station") ); |
60 |
String format = req.getParameter("format"); |
String format = req.getParameter("format"); |