public class RatpackMain extends Object
This class is designed to be subclassable.
Constructor and Description |
---|
RatpackMain() |
Modifier and Type | Method and Description |
---|---|
protected void |
addImpliedDefaults(Properties properties)
Subclass hook for adding default property values.
|
static void |
main(String[] args)
Starts a Ratpack application, by creating a new instance of this class and calling
start() . |
RatpackServer |
server(Properties overrideProperties,
Properties defaultProperties)
Builds a server by calling
LaunchConfigFactory.createFromGlobalProperties(ClassLoader, java.util.Properties, java.util.Properties) . |
void |
start()
Starts the server returned by calling
server(java.util.Properties, java.util.Properties) . |
public static void main(String[] args) throws Exception
start()
.args
- ignoredException
- if the application cannot be startedpublic RatpackServer server(Properties overrideProperties, Properties defaultProperties)
LaunchConfigFactory.createFromGlobalProperties(ClassLoader, java.util.Properties, java.util.Properties)
.
Uses this class's classloader as the classloader.
overrideProperties
- The override propertiesdefaultProperties
- The default propertiespublic void start() throws Exception
server(java.util.Properties, java.util.Properties)
.
The system properties are given as the override properties, and an empty property set as the defaults.
Exception
- if the server cannot be startedprotected void addImpliedDefaults(Properties properties)
This implementation does not add any.
properties
- The properties to add the defaults to