commit | author | age
|
2f2aa7
|
1 |
package de.uhilger.calypso.neu; |
U |
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.util.logging.Level; |
|
5 |
import java.util.logging.Logger; |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
* @author Ulrich Hilger |
|
10 |
*/ |
|
11 |
public class Server { |
|
12 |
|
|
13 |
private static final Logger logger = Logger.getLogger(de.uhilger.calypso.Server.class.getName()); |
|
14 |
|
|
15 |
public static final String CONF = "conf"; |
|
16 |
public static final String PORT = "port"; |
|
17 |
public static final String SKRIPTE = "skripte"; |
|
18 |
|
|
19 |
public static final String EQUAL = "="; |
|
20 |
|
|
21 |
private AppProperties einst; |
|
22 |
|
|
23 |
public void start(AppProperties einst) { |
|
24 |
logger.log(Level.INFO, "Server startet auf Port {0}", einst.getString(PORT)); |
|
25 |
this.einst = einst; |
|
26 |
String skripte = einst.getString(SKRIPTE); |
|
27 |
File playSkript = new File(skripte, "play"); |
|
28 |
if(playSkript.exists()) { |
|
29 |
logger.log(Level.INFO, "Skripte gefunden in {0}", playSkript.getParentFile().getAbsolutePath()); |
|
30 |
} else { |
|
31 |
logger.log(Level.INFO, "Skripte nicht gefunden, Ordner laut Einstellungen: {0}", skripte); |
|
32 |
} |
|
33 |
} |
|
34 |
|
|
35 |
} |