Class 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:

    1. Directory Location: jetty.home=[directory] (the jetty.home location)
    2. Directory Location: jetty.base=[directory] (the jetty.base location)
    3. Start Logging behavior: --debug (debugging enabled)
    4. Start Logging behavior: --start-log-file=logs/start.log (output start logs to logs/start.log location)
    5. Module Resolution
    6. Properties Resolution
    7. Present Optional Informational Options
    8. Normal Startup
    • Constructor Detail

      • Main

        public Main()
             throws java.io.IOException
        Throws:
        java.io.IOException
    • 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 for processCommandLine(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 host
        port - the port
        key - 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()