labels
This commit is contained in:
parent
ca23f2a4f3
commit
53dfb0e4d0
|
@ -133,6 +133,8 @@ public class BrokerClientApp implements CommandLineRunner {
|
|||
for (final String s : brokerUtils.listSubscriptions(baseUrl, user)) {
|
||||
if (!interactive || confirm(s)) {
|
||||
brokerUtils.downloadEvents(baseUrl, s, outputDir, gzip);
|
||||
} else {
|
||||
System.out.println("-- SKIPPED --");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,16 +144,14 @@ public class BrokerClientApp implements CommandLineRunner {
|
|||
}
|
||||
|
||||
private boolean confirm(final String s) throws IOException {
|
||||
System.out.print(String.format("Do you want download subscription %s? (Y/N) ", s));
|
||||
System.out.print(String.format("\nDo you want download subscription %s? (Y/N) ", s));
|
||||
System.out.flush();
|
||||
|
||||
char c = (char) System.in.read();
|
||||
while (true) {
|
||||
if (c == 'y' || c == 'Y') {
|
||||
System.out.println();
|
||||
return true;
|
||||
} else if (c == 'n' || c == 'N') {
|
||||
System.out.println();
|
||||
return false;
|
||||
} else {
|
||||
c = (char) System.in.read();
|
||||
|
|
|
@ -53,7 +53,7 @@ public class BrokerUtils {
|
|||
final String topic = object.getString("topic");
|
||||
final String ds = extractDsName(object.getJSONArray("conditionsAsList"));
|
||||
|
||||
System.out.println(String.format(" - %s (TOPIC: %s, DS: %s)", suscrId, topic, ds));
|
||||
System.out.println(String.format(" - %s (TOPIC: %s, Datasource: %s)", suscrId, topic, ds));
|
||||
|
||||
res.add(suscrId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue