Package winstone

Class Launcher

java.lang.Object
winstone.Launcher
All Implemented Interfaces:
Runnable

public class Launcher extends Object implements Runnable
Implements the main launcher daemon thread. This is the class that gets launched by the command line, and owns the server socket, etc.
Version:
$Id: Launcher.java,v 1.29 2007/04/23 02:55:35 rickknowles Exp $
Author:
Rick Knowles
  • Field Details

  • Constructor Details

    • Launcher

      public Launcher(Map<String,String> args) throws IOException
      Constructor - initialises the web app, object pools, control port and the available protocol listeners.
      Throws:
      IOException
  • Method Details

    • spawnListener

      protected org.eclipse.jetty.server.Connector spawnListener(String listenerClassName, List<org.eclipse.jetty.server.Connector> connectors) throws IOException
      Instantiates listeners. Note that an exception thrown in the constructor is interpreted as the listener being disabled, so don't do anything too adventurous in the constructor, or if you do, catch and log any errors locally before rethrowing.
      Throws:
      IOException
    • run

      public void run()
      The main run method. This handles the normal thread processing.
      Specified by:
      run in interface Runnable
    • handleControlRequest

      protected void handleControlRequest(Socket csAccepted) throws IOException
      Throws:
      IOException
    • shutdown

      public void shutdown()
    • isRunning

      public boolean isRunning()
    • main

      public static void main(String[] argv) throws IOException
      Main method. This basically just accepts a few args, then initialises the listener thread. For now, just shut it down with a control-C.
      Throws:
      IOException
    • getArgsFromCommandLine

      public static Map<String,String> getArgsFromCommandLine(String[] argv) throws IOException
      Throws:
      IOException
    • deployEmbeddedWarfile

      protected static void deployEmbeddedWarfile(Map<String,String> args) throws IOException
      Throws:
      IOException
    • initLogger

      public static void initLogger(Map<String,String> args) throws IOException
      Throws:
      IOException
    • printUsage

      protected static void printUsage()