Package org.eclipse.jetty.start
Class Main
- java.lang.Object
-
- org.eclipse.jetty.start.Main
-
public class Main extends java.lang.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(java.lang.String[] args)
void
invokeMain(java.lang.ClassLoader classloader, StartArgs args)
void
listConfig(StartArgs args)
void
listModules(StartArgs args)
static void
main(java.lang.String[] args)
static boolean
printTextResource(java.lang.String resourceName)
StartArgs
processCommandLine(java.lang.String[] cmdLine)
StartArgs
processCommandLine(java.util.List<java.lang.String> cmdLine)
Convenience forprocessCommandLine(cmdLine.toArray(new String[cmdLine.size()]))
void
start()
void
start(StartArgs args)
void
stop()
void
stop(java.lang.String host, int port, java.lang.String key)
Stop a running jetty instance.void
stop(java.lang.String host, int port, java.lang.String key, int timeout)
void
usage(boolean exit)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
getBaseHome
public BaseHome getBaseHome()
-
invokeMain
public void invokeMain(java.lang.ClassLoader classloader, StartArgs args) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.ClassNotFoundException
java.io.IOException
-
listConfig
public void listConfig(StartArgs args)
-
listModules
public void listModules(StartArgs args)
-
processCommandLine
public StartArgs processCommandLine(java.util.List<java.lang.String> cmdLine) throws java.lang.Exception
Convenience forprocessCommandLine(cmdLine.toArray(new String[cmdLine.size()]))
- Parameters:
cmdLine
- the command line- Returns:
- the start args parsed from the command line
- Throws:
java.lang.Exception
- if unable to process the command line
-
processCommandLine
public StartArgs processCommandLine(java.lang.String[] cmdLine) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public void start(StartArgs args) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
stop
public void stop(java.lang.String host, int port, java.lang.String key)
Stop a running jetty instance.- Parameters:
host
- the hostport
- the portkey
- the key
-
stop
public void stop(java.lang.String host, int port, java.lang.String key, int timeout)
-
usage
public void usage(boolean exit)
-
printTextResource
public static boolean printTextResource(java.lang.String resourceName)
-
init
public void init(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public void start() throws java.lang.Exception
- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.Exception
- Throws:
java.lang.Exception
-
destroy
public void destroy()
-
-