Package winstone
Class Launcher
java.lang.Object
winstone.Launcher
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final WinstoneResourceBundle
final org.eclipse.jetty.server.Server
static final byte
static String
Overridable usage screenstatic final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
deployEmbeddedWarfile
(Map<String, String> args) getArgsFromCommandLine
(String[] argv) protected void
handleControlRequest
(Socket csAccepted) static void
initLogger
(Map<String, String> args) boolean
static void
Main method.protected static void
void
run()
The main run method.void
shutdown()
protected org.eclipse.jetty.server.Connector
spawnListener
(String listenerClassName, List<org.eclipse.jetty.server.Connector> connectors) Instantiates listeners.
-
Field Details
-
SHUTDOWN_TYPE
public static final byte SHUTDOWN_TYPE- See Also:
-
RELOAD_TYPE
public static final byte RELOAD_TYPE- See Also:
-
WINSTONE_PORT_FILE_NAME_PROPERTY
- See Also:
-
RESOURCES
-
server
public final org.eclipse.jetty.server.Server server -
USAGE
Overridable usage screen
-
-
Constructor Details
-
Launcher
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. -
handleControlRequest
- Throws:
IOException
-
shutdown
public void shutdown() -
isRunning
public boolean isRunning() -
main
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
- Throws:
IOException
-
deployEmbeddedWarfile
- Throws:
IOException
-
initLogger
- Throws:
IOException
-
printUsage
protected static void printUsage()
-