public class DevMode extends DevModeBase implements RestartServerCallback
main(String[])
.Modifier and Type | Class and Description |
---|---|
protected static class |
DevMode.ArgHandlerServer
Handles the -server command line flag.
|
protected static class |
DevMode.ArgHandlerStartupURLs
Handles a startup url that can be passed on the command line.
|
protected static class |
DevMode.ArgHandlerSuperDevMode
Runs the superdev-mode code server instead of classic one.
|
protected static class |
DevMode.ArgProcessor
The argument processor.
|
static interface |
DevMode.HostedModeOptions
Handles the -superDevMode command line flag.
|
protected static class |
DevMode.HostedModeOptionsImpl
Concrete class to implement all hosted mode options.
|
protected static interface |
DevMode.OptionSuperDevMode
Determines whether to start the code server or not.
|
DevModeBase.ArgHandlerCodeServerPort, DevModeBase.ArgHandlerLogDir, DevModeBase.ArgHandlerNoServerFlag, DevModeBase.ArgHandlerPort, DevModeBase.ArgHandlerRemoteUI, DevModeBase.HostedModeBaseOptions, DevModeBase.HostedModeBaseOptionsImpl, DevModeBase.OptionCodeServerPort, DevModeBase.OptionLogDir, DevModeBase.OptionNoServer, DevModeBase.OptionPort, DevModeBase.OptionRemoteUI, DevModeBase.OptionStartupURLs, DevModeBase.UiBrowserWidgetHostImpl
Modifier and Type | Field and Description |
---|---|
protected CodeServerListener |
listener |
protected DevMode.HostedModeOptions |
options
Hiding super field because it's actually the same object, just with a stronger type.
|
baseLogLevelForUI, browserHost, compilerContext, compilerContextBuilder, connectAddress, isHttps, ui
Modifier | Constructor and Description |
---|---|
protected |
DevMode()
Default constructor for testing; no public API yet.
|
Modifier and Type | Method and Description |
---|---|
protected DevMode.HostedModeOptions |
createOptions() |
protected void |
doShutDownServer() |
protected boolean |
doSlowStartup()
Perform any slower startup tasks, such as loading modules.
|
protected boolean |
doStartup() |
protected int |
doStartUpServer() |
protected void |
ensureCodeServerListener() |
protected String |
getWebServerName() |
protected void |
inferStartupUrls()
Add any plausible HTML files which might be used as startup URLs.
|
protected ModuleDef |
loadModule(TreeLogger logger,
String moduleName,
boolean refresh)
Load a module.
|
static void |
main(String[] args)
Startup development mode.
|
protected URL |
makeStartupUrl(String url) |
void |
onRestartServer(TreeLogger logger)
Called by the UI on a restart server event.
|
protected void |
produceOutput(TreeLogger logger,
StandardLinkerContext linkerStack,
ArtifactSet artifacts,
ModuleDef module,
boolean isRelink) |
protected void |
warnAboutNoStartupUrls()
Log a warning explaining that no startup URLs were specified and no
plausible startup URLs were found.
|
addStartupURL, checkForUpdatesInterval, doCreateShellModuleSpaceHost, doStartup, getBaseLogLevelForUI, getHost, getPort, getTopLogger, isHeadless, link, normalizeURL, onDone, randomString, run, setDone, setHeadless, setPort, setRunTomcat, shutDown, startUp
protected CodeServerListener listener
protected final DevMode.HostedModeOptions options
public static void main(String[] args)
args
- command line argumentspublic void onRestartServer(TreeLogger logger)
onRestartServer
in interface RestartServerCallback
logger
- TreeLogger for any logging requiredprotected DevMode.HostedModeOptions createOptions()
createOptions
in class DevModeBase
protected void doShutDownServer()
doShutDownServer
in class DevModeBase
protected boolean doSlowStartup()
DevModeBase
DevModeBase.doStartup()
so that the UI can be updated as soon as possible
and the web server can be started earlier.doSlowStartup
in class DevModeBase
protected boolean doStartup()
doStartup
in class DevModeBase
protected int doStartUpServer()
doStartUpServer
in class DevModeBase
protected void ensureCodeServerListener()
ensureCodeServerListener
in class DevModeBase
protected String getWebServerName()
protected void inferStartupUrls()
DevModeBase
options.addStartupUrl(url)
.inferStartupUrls
in class DevModeBase
protected ModuleDef loadModule(TreeLogger logger, String moduleName, boolean refresh) throws UnableToCompleteException
DevModeBase
loadModule
in class DevModeBase
logger
- TreeLogger to usemoduleName
- name of the module to loadrefresh
- if true
, refresh the module from diskUnableToCompleteException
protected URL makeStartupUrl(String url) throws UnableToCompleteException
makeStartupUrl
in class DevModeBase
UnableToCompleteException
protected void produceOutput(TreeLogger logger, StandardLinkerContext linkerStack, ArtifactSet artifacts, ModuleDef module, boolean isRelink) throws UnableToCompleteException
produceOutput
in class DevModeBase
UnableToCompleteException
protected void warnAboutNoStartupUrls()
DevModeBase
warnAboutNoStartupUrls
in class DevModeBase
Copyright © 2018. All rights reserved.