public class RemoteUI extends DevModeUI implements MessageTransport.ErrorCallback
Constructor and Description |
---|
RemoteUI(String host,
int port,
String clientId) |
Modifier and Type | Method and Description |
---|---|
ModuleHandle |
getModuleLogger(String userAgent,
String remoteSocket,
String url,
String tabKey,
String moduleName,
String sessionKey,
String agentTag,
byte[] agentIcon,
TreeLogger.Type logLevel)
Show that a module is loaded in the UI.
|
TreeLogger |
getWebServerLogger(String serverName,
byte[] serverIcon)
Create the web server portion of the UI if not already created, and
return its TreeLogger instance.
|
void |
moduleLoadComplete(boolean success)
Indicates that all modules have been loaded (loading the XML, not
completing onModuleLoad), and that URLs previously specified in
DevModeUI.setStartupUrls(Map) may be launched if successful. |
void |
onResponseException(Exception e)
Called when an exception occurs when attempting to send a response
message.
|
void |
onTermination(Exception e)
Called when the transport terminates due to an exception.
|
boolean |
restartWebServer() |
void |
setStartupUrls(Map<String,URL> urls)
Set the URLs that should be available to start.
|
getCallback, getConsoleLogger, getLogLevel, getTopLogger, hasCallback, initialize, setCallback, setWebServerSecure
public ModuleHandle getModuleLogger(String userAgent, String remoteSocket, String url, String tabKey, String moduleName, String sessionKey, String agentTag, byte[] agentIcon, TreeLogger.Type logLevel)
DevModeUI
Note that the CloseModuleEvent
should already have a callback
registered when this is called if needed -- the UI is not required to
change the UI if it is registered later.
getModuleLogger
in class DevModeUI
userAgent
- full user agent nameremoteSocket
- name of remote socket endpoint in host:port formaturl
- URL of top-level windowtabKey
- stable browser tab identifier, or the empty string if no
such identifier is availablemoduleName
- the name of the module loadedsessionKey
- a unique session keyagentTag
- short-form user agent identifier, suitable for use in
a label for this connectionagentIcon
- icon to use for the user agent (fits inside 24x24) or
null if unavailablelogLevel
- logging detail requestedpublic TreeLogger getWebServerLogger(String serverName, byte[] serverIcon)
DevModeUI
Note that the RestartServerEvent
should already have a callback
registered when this is called -- the UI is not required to change the
UI if it is registered later.
getWebServerLogger
in class DevModeUI
serverName
- short name of the web server or null if only the icon
should be usedserverIcon
- byte array containing an icon (fitting into 24x24) to
use for the server, or null if only the name should be usedpublic void moduleLoadComplete(boolean success)
DevModeUI
DevModeUI.setStartupUrls(Map)
may be launched if successful.moduleLoadComplete
in class DevModeUI
success
- true if all modules were successfully loadedpublic void onResponseException(Exception e)
MessageTransport.ErrorCallback
onResponseException
in interface MessageTransport.ErrorCallback
public void onTermination(Exception e)
MessageTransport.ErrorCallback
onTermination
in interface MessageTransport.ErrorCallback
e
- The exception that led to the terminationpublic boolean restartWebServer()
public void setStartupUrls(Map<String,URL> urls)
DevModeUI
setStartupUrls
in class DevModeUI
urls
- map of URLs -- the key is the name supplied with -startupUrls,
and the value is the mapped URL with all parameters includedCopyright © 2018. All rights reserved.