MCPcopy Create free account
hub / github.com/TrsstProject/trsst / buildOptions

Method buildOptions

src/main/java/com/trsst/Command.java:217–420  ·  view source on GitHub ↗
(String[] argv, PrintStream out, InputStream in)

Source from the content-addressed store, hash-verified

215 private static boolean HAS_TOR = false;
216
217 @SuppressWarnings("static-access")
218 private void buildOptions(String[] argv, PrintStream out, InputStream in) {
219
220 // NOTE: OptionsBuilder is NOT thread-safe
221 // which was causing us random failures.
222 Option o;
223
224 portOptions = new Options();
225
226 o = new Option(null, "Specify port");
227 o.setRequired(false);
228 o.setArgs(1);
229 o.setLongOpt("port");
230 portOptions.addOption(o);
231
232 o = new Option(null, "Expose client API");
233 o.setRequired(false);
234 o.setArgs(0);
235 o.setLongOpt("api");
236 portOptions.addOption(o);
237
238 o = new Option(null, "Launch embedded GUI");
239 o.setRequired(false);
240 o.setArgs(0);
241 o.setLongOpt("gui");
242 portOptions.addOption(o);
243
244 o = new Option(null, "Turn off SSL");
245 o.setRequired(false);
246 o.setArgs(0);
247 o.setLongOpt("clear");
248 portOptions.addOption(o);
249
250 o = new Option(null, "Use TOR (experimental)");
251 o.setRequired(false);
252 o.setArgs(0);
253 o.setLongOpt("tor");
254 portOptions.addOption(o);
255
256 pullOptions = new Options();
257
258 o = new Option("h", "Set host server for this operation");
259 o.setRequired(false);
260 o.setArgs(1);
261 o.setArgName("url");
262 o.setLongOpt("host");
263 pullOptions.addOption(o);
264
265 o = new Option("d", "Decrypt entries as specified recipient id");
266 o.setRequired(false);
267 o.setArgs(1);
268 o.setArgName("id");
269 o.setLongOpt("decrypt");
270 pullOptions.addOption(o);
271
272 postOptions = new Options();
273
274 o = new Option("a", "Attach the specified file, or - for std input");

Callers 1

doBeginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected