io.vertx.core.cli.annotations.Option Java Examples
The following examples show how to use
io.vertx.core.cli.annotations.Option.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 6 votes |
@Option(longName = "output", shortName = "o", argName = "output-file") @Description("Optional: If set, the generated json will be saved here. Otherwise, it's printed on the console.") public void setOutputFile(String output) { outputFile = new File(output); if(outputFile.exists()) { if(!outputFile.isFile()) { log.error("'{}' is not a valid file location", outputFile); } } else { try { if(!outputFile.createNewFile()) { log.error("'{}' is not a valid file location", outputFile); } } catch (Exception exception) { log.error("Error while creating file: '{}'", outputFile, exception); } } }
Example #2
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 6 votes |
@Option(longName = "pipeline", shortName = "p", argName = "config", required = true) @Description("A comma-separated list of sequence/graph pipeline steps to create boilerplate configuration from. " + "For sequences, allowed values are: " + "[crop_grid, crop_fixed_grid, dl4j, draw_bounding_box, draw_fixed_grid, draw_grid, " + "draw_segmentation, extract_bounding_box, camera_frame_capture, video_frame_capture" + "image_to_ndarray, logging, ssd_to_bounding_box, samediff, show_image, tensorflow]. " + "For graphs, the list item should be in the format '<output>=<type>(<inputs>)' or " + "'[outputs]=switch(<inputs>)' for switches. The pre-defined root input is named, 'input'. " + "Examples are ==> " + "Pipeline step: 'a=tensorflow(input),b=dl4j(input)' " + "Merge Step: 'c=merge(a,b)' " + "Switch Step (int): '[d1,d2,d3]=switch(int,select,input)' " + "Switch Step (string): '[d1,d2,d3]=switch(string,select,x:1,y:2,z:3,input)'" + "Any Step: 'e=any(d1,d2,d3)' " + "See the examples above for more usage information.") public void setPipeline(String pipelineString) { this.pipelineString = pipelineString; }
Example #3
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 6 votes |
@Option(longName = "output", shortName = "o", argName = "output-file") @Description("Optional: If set, the generated json/yaml will be saved here. Otherwise, it's printed on the console.") public void setOutputFile(String output) { outputFile = new File(output); if(outputFile.exists()) { if(!outputFile.isFile()) { System.out.format("'%s' is not a valid file location%n", outputFile); System.exit(1); } } else { try { if(!outputFile.createNewFile()) { System.out.format("'%s' is not a valid file location%n", outputFile); System.exit(1); } } catch (Exception exception) { System.out.format("Error while creating file: '%s'%n", outputFile); exception.printStackTrace(); System.exit(1); } } }
Example #4
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 5 votes |
@Option(longName = "protocol", shortName = "pr") @Description("Protocol to use with the server. Allowed values are [http, grpc, mqtt]") public void setYaml(String protocol) { try { this.protocol = ServerProtocol.valueOf(protocol.toUpperCase()); } catch (Exception exception) { System.out.format("Protocol can only be one of %s. Given %s%n", Arrays.toString(ServerProtocol.values()), protocol); exception.printStackTrace(); System.exit(1); } }
Example #5
Source File: BusPublish.java From vertx-shell with Apache License 2.0 | 5 votes |
@Option(longName = "header", acceptMultipleValues = true) @Description("add an header formatted as header_name:header_value") public void setHeaders(List<String> headers) { for (String header : headers) { Matcher matcher = HEADER_PATTERN.matcher(header); if (!matcher.matches()) { throw new IllegalArgumentException("Invalid header value, use: --header foo:bar"); } options.addHeader(matcher.group(1), matcher.group(2)); } }
Example #6
Source File: BusPublish.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "verbose", flag = true) @Description("verbose output") public void setVerbose(boolean verbose) { this.verbose = verbose; }
Example #7
Source File: TestCommand.java From vertx-unit with Apache License 2.0 | 4 votes |
@Option(longName = "timeout", argName = "timeout") @Description("Set the test suite timeout in millis") public void setTimeout(long timeout) { this.timeout = timeout; }
Example #8
Source File: TestCommand.java From vertx-unit with Apache License 2.0 | 4 votes |
@Option(longName = "report", argName = "report") @Description("Report the execution to a file in JUnit XML format") public void setReport(boolean report) { // Todo report dir ???? this.report = report; }
Example #9
Source File: TestCommand.java From vertx-unit with Apache License 2.0 | 4 votes |
@Option(longName = "test", argName = "test") @Description("Select one or several tests to run") public void setTest(String test) { this.test = test; }
Example #10
Source File: BusTail.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "local", flag = true) @Description("subscribe to a local address") public void setLocal(boolean local) { this.local = local; }
Example #11
Source File: BusTail.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "verbose", flag = true) @Description("verbose output") public void setVerbose(boolean verbose) { this.verbose = verbose; }
Example #12
Source File: FileSystemLs.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "all", shortName = "a", required = false) @Description("include files that begins with .") public void setAll(boolean all) { this.all = all; }
Example #13
Source File: FileSystemLs.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(shortName = "l", flag = true) @Description("list in long format") public void setEll(boolean ell) { this.ell = ell; }
Example #14
Source File: BusSend.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "reply", flag = true) @Description("wait for a reply and print it on the console") public void setReply(boolean reply) { this.reply = reply; }
Example #15
Source File: BusSend.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "timeout") @Description("the send timeout") public void setTimeout(long timeout) { options.setSendTimeout(timeout); }
Example #16
Source File: BusPublish.java From vertx-shell with Apache License 2.0 | 4 votes |
@Option(longName = "type") @Description("the object type") public void setType(ObjectType type) { this.type = type; }
Example #17
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 4 votes |
@Option(longName = "types", shortName = "t", argName = "config-types", required = true) @Description("A comma-separated list of pipeline steps you want to create boilerplate configuration for. Allowed values are: [image, python, tensorflow, onnx, pmml, dl4j, keras]") public void setTypes(String types) { this.types = types; }
Example #18
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 4 votes |
@Option(longName = "yaml", shortName = "y", flag = true) @Description("Set if you want the output to be a yaml configuration.") public void setYaml(boolean yaml) { this.yaml = yaml; }
Example #19
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 4 votes |
@Option(longName = "minified", shortName = "m", flag = true) @Description("If set, the output json will be printed in a single line, without indentations. (Ignored for yaml configuration output)") public void setMinified(boolean minified) { this.minified = minified; }
Example #20
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 4 votes |
@Option(longName = "yaml", shortName = "y", flag = true) @Description("Set if you want the output to be a yaml configuration.") public void setYaml(boolean yaml) { this.yaml = yaml; }
Example #21
Source File: ConfigCommand.java From konduit-serving with Apache License 2.0 | 4 votes |
@Option(longName = "minified", shortName = "m", flag = true) @Description("If set, the output json will be printed in a single line, without indentations.") public void setMinified(boolean minified) { this.minified = minified; }