Skip to content

Commit

Permalink
Sample Push for Docker confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor Flynn committed Dec 15, 2022
1 parent 46a997d commit 8b59c0b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,13 @@ public void run() {

// execute valid response to engine
Response response = producer.send(tag, sub_tag, data);
out.writeUTF(new JSONObject()
.put("response", "200")
.put("code", response.code())
.put("message", response.message())
.put("data", response.data())
.toString());
out.flush();
System.out.println("<<<responded>>>");
// out.writeUTF(new JSONObject()
// .put("response", "200")
// .put("code", response.code())
// .put("message", response.message())
// .put("data", response.data())
// .toString());
// out.flush();

} catch(Exception e) {
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public class Config {
stream_properties.put("rest.socket.address", "localhost");
stream_properties.put("rest.socket.port", "61100");
stream_properties.put("rest.socket.key", "rest-key-reserved");
stream_properties.put("output.socket.address", "defi-de.idea.rpi.edu");
//stream_properties.put("output.socket.address", "localhost");
//stream_properties.put("output.socket.address", "defi-de.idea.rpi.edu");
stream_properties.put("output.socket.address", "localhost");
stream_properties.put("output.socket.port", "61200");
stream_properties.put("local.stream.type", "mongo_db");
stream_properties.put("mongodb.properties.uri", "mongodb://localhost:27017");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class Config {
app_properties.put("general.transfer.delim", "&&&");
app_properties.put("general.data.dateformat", "yyyy-MM-dd");
app_properties.put("spring.server.port", "8080");
//app_properties.put("spring.server.address", "localhost");
app_properties.put("spring.server.address", "defi-de.idea.rpi.edu");
app_properties.put("spring.server.address", "localhost");
//app_properties.put("spring.server.address", "defi-de.idea.rpi.edu");
app_properties.put("rest.socket.address", "localhost");
app_properties.put("rest.socket.port", "61100");
app_properties.put("rest.socket.key", "rest-key-reserved");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

public class LocalTest {

private static final String host = "localhost";
//private static final String host = "localhost";
private static final String host = "defi-de.idea.rpi.edu";

public static void main(String[] args) throws UnknownHostException, IOException {
final Socket socket = SocketFactory.getDefault().createSocket(host, 61200);
Expand All @@ -38,14 +39,14 @@ public static void main(String[] args) throws UnknownHostException, IOException
+ "destination&&&%s&&&"
+ "key&&&%s&&&"
+ "start_date&&&2022-08-01&&&"
+ "end_date&&&2022-08-02&&&"
+ "end_date&&&2022-09-01&&&"
+ "query&&&aave-protocol-dated&&&"
+ "request&&&aave-protocol-dated\n",
destination,
key));

while(true) {
System.out.print(readLine(in));
System.out.println(readLine(in));
}

// String rqst_protocol_dated = String.format("http://%s:8080/defi/v1/rest/request_dated?"
Expand Down Expand Up @@ -105,8 +106,9 @@ public static String request(String str) throws IOException {
public static final String readLine(BufferedReader in) throws IOException {
StringBuilder out = new StringBuilder();
char c = 0;
while((c = (char)in.read()) != 10)
while((c = (char)in.read()) != 10) {
out.append(c);
}

return out.toString();
}
Expand Down

0 comments on commit 8b59c0b

Please sign in to comment.