diff --git a/common/src/main/java/io/bitsquare/app/DevFlags.java b/common/src/main/java/io/bitsquare/app/DevFlags.java
index 9e8fcb0554..003969cdb3 100644
--- a/common/src/main/java/io/bitsquare/app/DevFlags.java
+++ b/common/src/main/java/io/bitsquare/app/DevFlags.java
@@ -6,6 +6,6 @@ import org.slf4j.LoggerFactory;
public class DevFlags {
private static final Logger log = LoggerFactory.getLogger(DevFlags.class);
- public static final boolean STRESS_TEST_MODE = false;
+ public static final boolean STRESS_TEST_MODE = true;
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
}
diff --git a/monitor/pom.xml b/monitor/pom.xml
index 13ace5773e..ece036df22 100644
--- a/monitor/pom.xml
+++ b/monitor/pom.xml
@@ -81,5 +81,13 @@
core
${project.parent.version}
+
+
+
+
+ net.sf.py4j
+ py4j
+ 0.10.1
+
\ No newline at end of file
diff --git a/monitor/src/main/java/io/bitsquare/monitor/Gateway.java b/monitor/src/main/java/io/bitsquare/monitor/Gateway.java
new file mode 100644
index 0000000000..00a5630b1d
--- /dev/null
+++ b/monitor/src/main/java/io/bitsquare/monitor/Gateway.java
@@ -0,0 +1,26 @@
+package io.bitsquare.monitor;
+
+import io.bitsquare.trade.offer.Offer;
+import io.bitsquare.trade.offer.OfferBookService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import py4j.GatewayServer;
+
+import java.util.List;
+
+public class Gateway {
+ private static final Logger log = LoggerFactory.getLogger(Gateway.class);
+ private OfferBookService offerBookService;
+
+ public Gateway(OfferBookService offerBookService) {
+ this.offerBookService = offerBookService;
+
+ GatewayServer gatewayServer = new GatewayServer(this);
+ gatewayServer.start();
+ log.info("Gateway Server Started");
+ }
+
+ public List getOffers() {
+ return offerBookService.getOffers();
+ }
+}
diff --git a/monitor/src/main/java/io/bitsquare/monitor/Monitor.java b/monitor/src/main/java/io/bitsquare/monitor/Monitor.java
index 509d4a3cfb..fe71b78210 100644
--- a/monitor/src/main/java/io/bitsquare/monitor/Monitor.java
+++ b/monitor/src/main/java/io/bitsquare/monitor/Monitor.java
@@ -24,6 +24,7 @@ public class Monitor {
private static Environment env;
private final Injector injector;
private final OfferBookService offerBookService;
+ private final Gateway gateway;
private P2PService p2pService;
@@ -67,5 +68,6 @@ public class Monitor {
p2pService = injector.getInstance(P2PService.class);
offerBookService = injector.getInstance(OfferBookService.class);
p2pService.start(false, null);
+ gateway = new Gateway(offerBookService);
}
}