Package org.microproxy
Interface LauncherExtension
- All Known Implementing Classes:
OtelLauncherExtension,StarlarkLauncherExtension
public interface LauncherExtension
Adds command-line options to
Launcher. Implementations are found with ServiceLoader, so an optional module on the class path (such as
microproxy-starlark) can contribute options without the core depending on it.-
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.
-
Method Details
-
usage
String usage()Returns help lines for the options this extension adds, formatted like the built-in ones.- Returns:
- help lines for the options this extension adds, formatted like the built-in ones
-
parseOption
Consumesoptionif it belongs to this extension, taking any values from the front ofargs. Returns false for options it does not recognise.- Parameters:
option- the command-line option to parseargs- the remaining command-line arguments- Returns:
- whether this extension consumed the option
-
configure
Applies the parsed options, after the built-in ones;HttpProxyServerBootstrap.getChainProxyManager()shows any upstream configuration to wrap.- 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
-