Greatly improved network code - the "manage the node repository" part of issue #5 should now be OK

This commit is contained in:
2015-06-16 06:41:59 +02:00
parent ed0d1c2911
commit c0a7acc609
14 changed files with 317 additions and 83 deletions

View File

@ -71,6 +71,7 @@ public class Application {
System.out.println("c) contacts");
System.out.println("s) subscriptions");
System.out.println("m) messages");
System.out.println("?) info");
System.out.println("e) exit");
command = nextCommand();
@ -89,6 +90,9 @@ public class Application {
case "m":
messages();
break;
case "?":
info();
break;
case "e":
break;
default:
@ -102,6 +106,11 @@ public class Application {
ctx.shutdown();
}
private void info() {
System.out.println();
System.out.println(ctx.status());
}
private String nextCommand() {
return scanner.nextLine().trim().toLowerCase();
}