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.ArgProcessor
The argument processor.
|
protected static interface |
DevMode.HostedModeOptions
Options controlling dev mode.
|
protected static class |
DevMode.HostedModeOptionsImpl
Concrete class to implement all hosted mode options.
|
DevModeBase.ArgHandlerBindAddress, DevModeBase.ArgHandlerBlacklist, DevModeBase.ArgHandlerCodeServerPort, DevModeBase.ArgHandlerLogDir, DevModeBase.ArgHandlerNoServerFlag, DevModeBase.ArgHandlerPort, DevModeBase.ArgHandlerRemoteUI, DevModeBase.ArgHandlerWhitelist, DevModeBase.HostedModeBaseOptions, DevModeBase.HostedModeBaseOptionsImpl, DevModeBase.OptionBindAddress, DevModeBase.OptionCodeServerPort, DevModeBase.OptionLogDir, DevModeBase.OptionNoServer, DevModeBase.OptionPort, DevModeBase.OptionRemoteUI, DevModeBase.OptionStartupURLs, DevModeBase.UiBrowserWidgetHostImpl
Modifier and Type | Field and Description |
---|---|
protected DevMode.HostedModeOptionsImpl |
options
Hiding super field because it's actually the same object, just with a
stronger type.
|
baseLogLevelForUI, bindAddress, codeServerPort, compilerContext, compilerContextBuilder, connectAddress, isHttps, listener, ui
Modifier | Constructor and Description |
---|---|
protected |
DevMode()
Default constructor for testing; no public API yet.
|
Modifier and Type | Method and Description |
---|---|
protected DevModeBase.HostedModeBaseOptions |
createOptions() |
protected void |
doShutDownServer() |
protected boolean |
doSlowStartup()
Perform any slower startup tasks, such as loading modules.
|
protected boolean |
doStartup() |
protected int |
doStartUpServer() |
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.
|
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, ensureCodeServerListener, getBaseLogLevelForUI, getHost, getPort, getTopLogger, isHeadless, link, normalizeURL, onDone, processUrl, randomString, run, setDone, setHeadless, setPort, setRunTomcat, shutDown, startUp
protected final DevMode.HostedModeOptionsImpl 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 DevModeBase.HostedModeBaseOptions 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 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 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.