Rev | Line | |
---|
[46] | 1 | package geniusweb.partiesserver;
|
---|
| 2 |
|
---|
| 3 | import javax.servlet.http.HttpServlet;
|
---|
| 4 |
|
---|
| 5 | import geniusweb.partiesserver.repository.AvailablePartiesRepo;
|
---|
| 6 | import geniusweb.partiesserver.repository.RunningPartiesRepo;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * Servlet that just starts the background tasks.
|
---|
| 10 | */
|
---|
| 11 | public class BackgroundServlet extends HttpServlet {
|
---|
| 12 | private static final int REFRESH_PERIOD_MS = 1000;
|
---|
| 13 | private static final long serialVersionUID = 1L;
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
| 16 | * @see HttpServlet#HttpServlet()
|
---|
| 17 | */
|
---|
| 18 | public BackgroundServlet() {
|
---|
| 19 | super();
|
---|
| 20 | new AvailablePartiesUpdater(AvailablePartiesRepo.instance());
|
---|
| 21 | new Thread(new RunningPartiesUpdater(RunningPartiesRepo.instance(),
|
---|
| 22 | REFRESH_PERIOD_MS)).start();
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.