use of ProducerDummy.Client.AbstractClient in project amos2022ss02-audit-chain by amosproj.
the class main method main.
public static void main(String[] args) throws IOException, TimeoutException, InterruptedException, ClassNotFoundException, NoSuchAlgorithmException, InvalidKeyException {
String filepath = Paths.get("src", "main", "java", "ProducerDummy").toString();
String filename = "config.properties";
Path config_path = Paths.get(System.getProperty("user.dir"), filepath, filename);
Properties p = new Properties();
FileReader reader = new FileReader(config_path.toString());
p.load(reader);
String HOST = p.getProperty("HOST");
int PORT = Integer.parseInt(p.getProperty("PORT"));
String USER = p.getProperty("USERNAME");
String PASSWORD = p.getProperty("PASSWORD");
String queue_name = "FAKE";
AbstractClient client = new AggregateClient(HOST, PORT, USER, PASSWORD, queue_name);
client.start();
return;
}
use of ProducerDummy.Client.AbstractClient in project amos2022ss02-audit-chain by amosproj.
the class main method main.
public static void main(String[] args) throws IOException, TimeoutException {
String filepath = Paths.get("src", "main", "java", "ConsumerDummy").toString();
String filename = "config.properties";
Path config_path = Paths.get(System.getProperty("user.dir"), filepath, filename);
Properties p = new Properties();
FileReader reader = new FileReader(config_path.toString());
p.load(reader);
String HOST = p.getProperty("HOST");
int PORT = Integer.parseInt(p.getProperty("PORT"));
String USER = p.getProperty("USERNAME");
String PASSWORD = p.getProperty("PASSWORD");
String queue_name = "FAKE";
AbstractClient client = new AggregateConsumerClient(HOST, PORT, USER, PASSWORD, queue_name);
client.start();
return;
}
Aggregations