]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/xvsm/cook/Cook.java
Show table and waiting group changes according to notifications in pizzeriaGUI and...
[pub/jan/sbc.git] / src / main / java / at / ac / tuwien / sbc / valesriegler / xvsm / cook / Cook.java
1 package at.ac.tuwien.sbc.valesriegler.xvsm.cook;
2
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5
6 import at.ac.tuwien.sbc.valesriegler.xvsm.AbstractXVSMConnector;
7 import at.ac.tuwien.sbc.valesriegler.xvsm.XVSMConnector;
8
9 public class Cook {
10         private static final String USAGE = "Cook needs exactly one parameter: ID of type Integer";
11         private static final Logger log = LoggerFactory.getLogger(Cook.class);
12         
13         private int id;
14         private AbstractXVSMConnector xvsm;
15
16         public static void main(String[] args) {
17                 if(args.length != 1) {
18                         throw new IllegalArgumentException(USAGE);
19                 }
20                 
21                 int parsedId = 0;
22                 try {
23                         parsedId = Integer.parseInt(args[0]);
24                 } catch (NumberFormatException e) {
25                         log.error(USAGE);
26                         return;
27                 }
28                 
29                 Cook cook = new Cook(parsedId);
30                 cook.start();
31         }
32
33         private void start() {
34                 initSpaceCommunication();
35                 
36
37                 
38         }
39         
40         private void initSpaceCommunication() {
41                 xvsm = new XVSMConnector();
42                 xvsm.initSpaceCommunication();
43
44                 log.info("Space Connection established!");
45                 
46                 
47         }
48
49         public Cook(int id) {
50                 this.id = id;
51                 log.info("I AM A Cook WITH ID {}", id);
52         }
53
54 }