PageRenderTime 22ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/src/com/kousenit/servlets/UpdateDatabase.java

http://github.com/kousen/recommended-books
Java | 26 lines | 20 code | 6 blank | 0 comment | 0 complexity | f07668cc6e22ad8f6f715b28ea1f97ba MD5 | raw file
 1package com.kousenit.servlets;
 2
 3import java.io.IOException;
 4
 5import javax.servlet.ServletException;
 6import javax.servlet.http.HttpServlet;
 7import javax.servlet.http.HttpServletRequest;
 8import javax.servlet.http.HttpServletResponse;
 9
10import com.kousenit.services.AmazonBookService;
11
12@SuppressWarnings("serial")
13public class UpdateDatabase extends HttpServlet {
14	private AmazonBookService service;
15	
16	@Override
17	public void init() throws ServletException {
18		service = AmazonBookService.getInstance();
19	}
20	
21	@Override
22	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
23			throws ServletException, IOException {
24		service.refreshDatabase();
25	}
26}