comparison src/org/dancres/blitz/notify/GeneratorConfig.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.notify;
2
3 import net.jini.config.ConfigurationException;
4
5 import org.dancres.blitz.config.ConfigurationFactory;
6
7 import net.jini.security.ProxyPreparer;
8
9 /**
10 Holds all EventGenerator configurable state
11 */
12 class GeneratorConfig {
13 private static final ProxyPreparer RECOVERY_PREPARER;
14 private static final ProxyPreparer PREPARER;
15 private static final int SAVE_INTERVAL;
16 private static final int RESTART_JUMP;
17
18 static {
19 try {
20 RECOVERY_PREPARER =
21 ConfigurationFactory.getPreparer("recoveredNotifyPreparer");
22
23 PREPARER =
24 ConfigurationFactory.getPreparer("notifyPreparer");
25
26 SAVE_INTERVAL = ((Integer)
27 ConfigurationFactory.getEntry("eventgenSaveInterval",
28 int.class,
29 new Integer(50))).intValue();
30
31 RESTART_JUMP = ((Integer)
32 ConfigurationFactory.getEntry("eventgenRestartJump",
33 int.class,
34 new Integer(1000))).intValue();
35 } catch (ConfigurationException aCE) {
36 throw new RuntimeException("EvGen has problems with config",
37 aCE);
38 }
39 }
40
41 static ProxyPreparer getRecoveryPreparer() {
42 return RECOVERY_PREPARER;
43 }
44
45 static ProxyPreparer getPreparer() {
46 return PREPARER;
47 }
48
49 static int getSaveInterval() {
50 return SAVE_INTERVAL;
51 }
52
53 static int getRestartJump() {
54 return RESTART_JUMP;
55 }
56 }