comparison flys-artifacts/src/main/java/de/intevation/flys/wsplgen/SchedulerSetup.java @ 1970:368040e5c400

Improved the Scheduler to be able to cancel running WSPLGEN jobs. flys-artifacts/trunk@3384 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 12 Dec 2011 08:15:12 +0000
parents
children
comparison
equal deleted inserted replaced
1969:baefcfba97aa 1970:368040e5c400
1 package de.intevation.flys.wsplgen;
2
3 import org.w3c.dom.Document;
4
5 import de.intevation.artifacts.GlobalContext;
6
7 import de.intevation.artifactdatabase.LifetimeListener;
8
9 import de.intevation.flys.artifacts.context.FLYSContext;
10
11
12 /**
13 * A LifetimeListener that is used to create an instance of Scheduler. This
14 * instance is put into the GlobalContext using FLYSContext.SCHEDULER.
15 *
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
17 */
18 public class SchedulerSetup implements LifetimeListener {
19
20 @Override
21 public void setup(Document document) {
22 }
23
24
25 @Override
26 public void systemUp(GlobalContext globalContext) {
27 Scheduler scheduler = Scheduler.getInstance();
28 globalContext.put(FLYSContext.SCHEDULER, scheduler);
29 }
30
31
32 @Override
33 public void systemDown(GlobalContext globalContext) {
34 // TODO IMPLEMENT ME!
35 }
36 }
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org