Package org.eclipse.jetty.start
Class Main
- java.lang.Object
-
- org.eclipse.jetty.start.Main
-
public class Main extends Object
Main start class.This class is intended to be the main class listed in the MANIFEST.MF of the start.jar archive. It allows the Jetty Application server to be started with the command "java -jar start.jar".
Argument processing steps:
- Directory Location: jetty.home=[directory] (the jetty.home location)
- Directory Location: jetty.base=[directory] (the jetty.base location)
- Start Logging behavior: --debug (debugging enabled)
- Start Logging behavior: --start-log-file=logs/start.log (output start logs to logs/start.log location)
- Module Resolution
- Properties Resolution
- Present Optional Informational Options
- Normal Startup
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
BaseHome
getBaseHome()
void
init(String[] args)
void
invokeMain(ClassLoader classloader, StartArgs args)
void
listConfig(StartArgs args)
void
listModules(StartArgs args)
static void
main(String[] args)
static boolean
printTextResource(String resourceName)
StartArgs
processCommandLine(String[] cmdLine)
StartArgs
processCommandLine(List<String> cmdLine)
Convenience forprocessCommandLine(cmdLine.toArray(new String[cmdLine.size()]))
void
start()
void
start(StartArgs args)
void
stop()
void
stop(String host, int port, String key)
Stop a running jetty instance.void
stop(String host, int port, String key, int timeout)
void
usage(boolean exit)
-
-
-
Constructor Detail
-
Main
public Main() throws IOException
- Throws:
IOException
-
-
Method Detail
-
main
public static void main(String[] args)
-
getBaseHome
public BaseHome getBaseHome()
-
invokeMain
public void invokeMain(ClassLoader classloader, StartArgs args) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException, IOException
-
listConfig
public void listConfig(StartArgs args)
-
listModules
public void listModules(StartArgs args)
-
processCommandLine
public StartArgs processCommandLine(List<String> cmdLine) throws Exception
Convenience forprocessCommandLine(cmdLine.toArray(new String[cmdLine.size()]))
- Parameters:
cmdLine
- the command line- Returns:
- the start args parsed from the command line
- Throws:
Exception
- if unable to process the command line
-
processCommandLine
public StartArgs processCommandLine(String[] cmdLine) throws Exception
- Throws:
Exception
-
start
public void start(StartArgs args) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
stop
public void stop(String host, int port, String key)
Stop a running jetty instance.- Parameters:
host
- the hostport
- the portkey
- the key
-
usage
public void usage(boolean exit)
-
printTextResource
public static boolean printTextResource(String resourceName)
-
destroy
public void destroy()
-
-