+ @Override
+ public Options getOptions() {
+ Options options = new Options();
+ options.addOption(connectOption);
+ return options;
+ }
+
+ @Override
+ public Void apply(List<String> t) {
+ CommandLine line = toCommandLine(t);
+ String uriArg = line.getOptionValue(connectOption);
+ // TODO make it more robust (trailing /, etc.)
+ URI uri = URI.create(uriArg);
+ if ("".equals(uri.getPath())) {
+ uri = URI.create(uri.toString() + "/cms/status/ping");
+ }
+ new WebSocketPing(uri).run();
+ return null;
+ }
+
+ @Override
+ public String getUsage() {
+ return "[ws|wss]://host:port/";
+ }
+
+ @Override
+ public String getDescription() {
+ return "Test whether an Argeo CMS is available, without auhtentication";
+ }
+
+ }
+
+ class Events implements DescribedCommand<Void> {
+
+ @Override
+ public Options getOptions() {
+ Options options = new Options();
+ options.addOption(connectOption);
+ return options;
+ }