if (args.length < 1)
return;
String methodName = args[0];
try {
if (methodName.equals("meshms-list-conversations"))
meshms_list_conversations(new SubscriberId(args[1]));
else if (methodName.equals("meshms-list-messages"))
meshms_list_messages(new SubscriberId(args[1]), new SubscriberId(args[2]));
else if (methodName.equals("meshms-list-messages-since"))
meshms_list_messages_since(new SubscriberId(args[1]), new SubscriberId(args[2]), args[3]);
else if (methodName.equals("meshms-send-message"))
meshms_send_message(new SubscriberId(args[1]), new SubscriberId(args[2]), args[3]);
else if (methodName.equals("meshms-mark-all-conversations-read"))
meshms_mark_all_conversations_read(new SubscriberId(args[1]));
else if (methodName.equals("meshms-mark-all-messages-read"))
meshms_mark_all_messages_read(new SubscriberId(args[1]), new SubscriberId(args[2]));
else if (methodName.equals("meshms-advance-read-offset"))
meshms_advance_read_offset(new SubscriberId(args[1]), new SubscriberId(args[2]), Long.parseLong(args[3]));
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
System.err.println("No such command: " + methodName);