Package org.microproxy.starlark
Class StarlarkLauncherExtension
java.lang.Object
org.microproxy.starlark.StarlarkLauncherExtension
- All Implemented Interfaces:
LauncherExtension
Adds
--script to the command line when this module is on the class path.-
Constructor Summary
ConstructorsConstructorDescriptionCreates an extension with script reloading enabled and no script selected. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(HttpProxyServerBootstrap bootstrap, PrintStream console) Applies the parsed options, after the built-in ones;HttpProxyServerBootstrap.getChainProxyManager()shows any upstream configuration to wrap.booleanparseOption(String option, Deque<String> args) Consumesoptionif it belongs to this extension, taking any values from the front ofargs.usage()Returns help lines for the options this extension adds, formatted like the built-in ones.
-
Constructor Details
-
StarlarkLauncherExtension
public StarlarkLauncherExtension()Creates an extension with script reloading enabled and no script selected.
-
-
Method Details
-
usage
Description copied from interface:LauncherExtensionReturns help lines for the options this extension adds, formatted like the built-in ones.- Specified by:
usagein interfaceLauncherExtension- Returns:
- help lines for the options this extension adds, formatted like the built-in ones
-
parseOption
Description copied from interface:LauncherExtensionConsumesoptionif it belongs to this extension, taking any values from the front ofargs. Returns false for options it does not recognise.- Specified by:
parseOptionin interfaceLauncherExtension- Parameters:
option- the command-line option to parseargs- the remaining command-line arguments- Returns:
- whether this extension consumed the option
-
configure
Description copied from interface:LauncherExtensionApplies the parsed options, after the built-in ones;HttpProxyServerBootstrap.getChainProxyManager()shows any upstream configuration to wrap.- Specified by:
configurein interfaceLauncherExtension- Parameters:
bootstrap- the proxy configuration to extendconsole- the output stream for status messages and diagnostics- Throws:
IOException- if extension configuration cannot be loaded or initialized
-