public abstract class CLIHandler extends Object
ServiceProvider
in a JAR file in the startup or dynamic class path (e.g. lib/ext/
or lib/
).Modifier and Type | Class and Description |
---|---|
static class |
CLIHandler.Args
Class that represents available arguments to the CLI
handlers.
|
Modifier and Type | Field and Description |
---|---|
static int |
WHEN_BOOT
Used during bootstrap sequence.
|
static int |
WHEN_EXTRA
Extra set of inits.
|
static int |
WHEN_INIT
Used during later initialization or while NetBeans is up and running.
|
Modifier | Constructor and Description |
---|---|
protected |
CLIHandler(int when)
Create a CLI handler and indicate its preferred timing.
|
Modifier and Type | Method and Description |
---|---|
protected abstract int |
cli(CLIHandler.Args args)
Process some set of command-line arguments.
|
protected static int |
notifyHandlers(CLIHandler.Args args,
Collection<? extends CLIHandler> handlers,
int when,
boolean failOnUnknownOptions,
boolean consume)
Notification of available handlers.
|
protected static void |
showHelp(PrintWriter w,
Collection<? extends CLIHandler> handlers,
int when) |
static void |
stopServer()
Stops the server.
|
protected abstract void |
usage(PrintWriter w)
Print usage information for this handler.
|
public static final int WHEN_BOOT
public static final int WHEN_INIT
public static final int WHEN_EXTRA
protected CLIHandler(int when)
when
- when to run the handler: CLIHandler.WHEN_BOOT
or CLIHandler.WHEN_INIT
protected abstract int cli(CLIHandler.Args args)
args
- argumentsprotected static void showHelp(PrintWriter w, Collection<? extends CLIHandler> handlers, int when)
protected abstract void usage(PrintWriter w)
w
- a writer to print toprotected static int notifyHandlers(CLIHandler.Args args, Collection<? extends CLIHandler> handlers, int when, boolean failOnUnknownOptions, boolean consume)
public static void stopServer()