Greatly improved network code - the "manage the node repository" part of issue #5 should now be OK
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user