Zeer veel aanpassingen:
- omslachtigheden verbeterd - netwerking gefixt - ...
This commit is contained in:
34
java/src/pm/Client.java
Normal file
34
java/src/pm/Client.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package pm;
|
||||
|
||||
import pm.event.spreader.NetworkSpreader;
|
||||
import pm.exception.device.DeviceInitialiseException;
|
||||
import pm.exception.event.spreader.NetworkSpreaderException;
|
||||
|
||||
public class Client extends Manager {
|
||||
public static final String IP = "localhost";
|
||||
public static final int PORT = 6789;
|
||||
|
||||
public Client(String ip, int port) throws NetworkSpreaderException {
|
||||
super(new NetworkSpreader(ip, port));
|
||||
}
|
||||
|
||||
public Client() throws NetworkSpreaderException {
|
||||
this(IP, PORT);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
log.info("LocalManager!");
|
||||
try {
|
||||
initialise();
|
||||
} catch (DeviceInitialiseException e) {}
|
||||
super.start(false);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
new Client().start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user