Refactor part of core.legacy to core.networking
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
dependencies {
|
||||
compile project(':core.legacy')
|
||||
compile project(':core.networking')
|
||||
compile project(':core.mimis')
|
||||
compile project(':core.legacy')
|
||||
compile project(':device.lirc')
|
||||
compile project(':exec.mimis')
|
||||
|
||||
|
||||
@@ -12,35 +12,35 @@ import dummy.Dummy;
|
||||
|
||||
public class TestTcpCommunication {
|
||||
public static void main(String[] args) throws Exception {
|
||||
Properties localProperties = new Properties();
|
||||
localProperties.setProperty("implementation", "local");
|
||||
localProperties.setProperty("server", "true");
|
||||
localProperties.setProperty("server.port", "8883");
|
||||
localProperties.setProperty("server.protocol", "tcp");
|
||||
Properties localProperties = new Properties();
|
||||
localProperties.setProperty("implementation", "local");
|
||||
localProperties.setProperty("server", "true");
|
||||
localProperties.setProperty("server.port", "8883");
|
||||
localProperties.setProperty("server.protocol", "tcp");
|
||||
|
||||
Properties remoteProperties = new Properties();
|
||||
remoteProperties.setProperty("implementation", "remote");
|
||||
remoteProperties.setProperty("protocol", "tcp");
|
||||
remoteProperties.setProperty("remote.host", "localhost");
|
||||
remoteProperties.setProperty("remote.port", "8883");
|
||||
Properties remoteProperties = new Properties();
|
||||
remoteProperties.setProperty("implementation", "remote");
|
||||
remoteProperties.setProperty("protocol", "tcp");
|
||||
remoteProperties.setProperty("remote.host", "localhost");
|
||||
remoteProperties.setProperty("remote.port", "8883");
|
||||
|
||||
Loader localLoader = new Loader(localProperties);
|
||||
Loader remoteLoader = new Loader(remoteProperties);
|
||||
Loader localLoader = new Loader(localProperties);
|
||||
Loader remoteLoader = new Loader(remoteProperties);
|
||||
|
||||
Lirc localLirc = localLoader.getLirc();
|
||||
Lirc remoteLirc = remoteLoader.getLirc();
|
||||
Lirc localLirc = localLoader.getLirc();
|
||||
Lirc remoteLirc = remoteLoader.getLirc();
|
||||
|
||||
Properties iBuddyProperties = new Properties();
|
||||
iBuddyProperties.setProperty("implementation", "local");
|
||||
iBuddy iBuddy = new com.github.boukefalos.ibuddy.Loader(iBuddyProperties).getiBuddy();
|
||||
Dummy dummy = new Dummy(localLirc, iBuddy);
|
||||
Properties iBuddyProperties = new Properties();
|
||||
iBuddyProperties.setProperty("implementation", "local");
|
||||
iBuddy iBuddy = new com.github.boukefalos.ibuddy.Loader(iBuddyProperties).getiBuddy();
|
||||
Dummy dummy = new Dummy(localLirc, iBuddy);
|
||||
|
||||
Control server = localLoader.getServer();
|
||||
Control server = localLoader.getServer();
|
||||
|
||||
remoteLirc.start();
|
||||
server.start();
|
||||
dummy.start();
|
||||
remoteLirc.start();
|
||||
server.start();
|
||||
dummy.start();
|
||||
|
||||
Thread.sleep(10000);
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user