Central model instance via singleton
This commit is contained in:
parent
ca92fd78c8
commit
1a9aa98c72
2 changed files with 19 additions and 10 deletions
|
@ -17,13 +17,9 @@ public class Main {
|
|||
* @param args Die Programmargumente
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Model m;
|
||||
HttpServer s = null;
|
||||
|
||||
m = new Model();
|
||||
m.fillMockData();
|
||||
|
||||
|
||||
/**HttpServer s = null;
|
||||
Model.getModel().fillMockData();
|
||||
|
||||
try {
|
||||
s = HttpServer.create(new InetSocketAddress("127.0.0.1", 8000), 0);
|
||||
|
@ -36,10 +32,10 @@ public class Main {
|
|||
s.setExecutor(null);
|
||||
s.start();
|
||||
} catch (IOException e) {
|
||||
System.err.println("IOException bei der Erstellung des HTTP Servers. Stack Trace folgt.");
|
||||
System.err.println("IOException bei der Erstellung des HTTP Servers.");
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}**/
|
||||
}
|
||||
// schließen ist nicht nötig, da beim Beenden die ganze JVM zerstört wird
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue