An object representing the core of OpenFin Runtime. Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime.
Asynchronous Methods
- addEventListener(type, listener, callback, errorCallback)
- clearCache(options, callback, errorCallback)
- deleteCacheOnExit(callback, errorCallback)
- downloadAsset(callback, errorCallback)
- downloadPreloadScripts(scripts, callback, errorCallback)
- downloadRuntime(callback, errorCallback)
- exit(callback, errorCallback)
- flushCookieStore(callback, errorCallback)
- getAllApplications(callback, errorCallback)
- getAllExternalApplications(callback, errorCallback)
- getAllWindows(callback, errorCallback)
- getAppAssetInfo(options, callback, errorCallback)
- getCommandLineArguments(callback, errorCallback)
- getCookies(options, callback, errorCallback)
- getCrashReporterState(callback, errorCallback)
- getEntityInfo(uuid, name, callback, errorCallback)
- getEnvironmentVariable(envVar, callback, errorCallback)
- getFocusedWindow(callback, errorCallback)
- getHostSpecs(callback, errorCallback)
- getLog(log, callback, errorCallback)
- getLogList(callback, errorCallback)
- getMachineId(callback, errorCallback)
- getMinLogLevel(callback, errorCallback)
- getMonitorInfo(callback, errorCallback)
- getMousePosition(callback, errorCallback)
- getProcessList(callback, errorCallback)
- getProxySettings(callback, errorCallback)
- getRuntimeInfo(callback, errorCallback)
- getRvmInfo(callback, errorCallback)
- getVersion(callback, errorCallback)
- launchExternalProcess(options, callback, errorCallback)
- log(level, message, callback, errorCallback)
- monitorExternalProcess(options, callback, errorCallback)
- openUrlWithBrowser(url, callback, errorCallback)
- readRegistryValue(rootKey, subkey, value, callback, errorCallback)
- registerExternalConnection(uuid, callback, errorCallback)
- releaseExternalProcess(processUuid, callback, errorCallback)
- removeEventListener(type, listener, callback, errorCallback)
- setMinLogLevel(level, callback, errorCallback)
- showDeveloperTools(uuid, name, callback, errorCallback)
- startCrashReporter(options, callback, errorCallback)
- terminateExternalProcess(processUuid, timeout, killTree, callback, errorCallback)
- updateProxySettings(type, address, port, callback, errorCallback)
All the above listed methods are both:
- Static — called directly on the
System
namespace - Asynchronous — having an
undefined
immediate return value but eventually invoking eithercallback
orerrorCallback
Members
(static) Clipboard :fin.desktop.System.Clipboard
Type:
Methods
(static) addEventListener(type, listener, callbackopt, errorCallbackopt)
Registers an event listener on the specified event.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | The type of the event. |
|
listener |
function | Called whenever an event of the specified type occurs. It is passed an event object containing information related to the event. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) clearCache(options, callbackopt, errorCallbackopt)
Clears cached data containing window state/positions, application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
fin.desktop.System~clearCacheOptions | See tutorial for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) deleteCacheOnExit(callbackopt, errorCallbackopt)
Clears all cached data when OpenFin Runtime exits. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) downloadAsset(assetObj, progressListeneropt, callbackopt, errorCallbackopt)
Downloads the given application asset. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assetObj |
Object | App asset object as described in: Application Config |
|
progressListener |
function |
<optional> |
called as the asset is downloaded with progress information. |
callback |
function |
<optional> |
called once the asset is downloaded, unziped and moved and is ready to be used. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) downloadPreloadScripts(scripts, callbackopt, errorCallbackopt)
Download preload scripts from given URLs
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
scripts |
Array.<preloadScript> | URLs of preload scripts. See tutorial for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) downloadRuntime(options, progressListeneropt, callbackopt, errorCallbackopt)
Downloads a version of the runtime. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
fin.desktop.System~downloadRuntimeOptions | Download options. |
|
progressListener |
function |
<optional> |
called as the runtime is downloaded with progress information. |
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) exit(callbackopt, errorCallbackopt)
Exits the Runtime.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) flushCookieStore(callbackopt, errorCallbackopt)
Writes any unwritten cookies data to disk.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getAllApplications(callbackopt, errorCallbackopt)
Retrieves an array of data for all applications.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getAllExternalApplications(callbackopt, errorCallbackopt)
Retrieves an array of data for all external applications.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getAllWindows(callbackopt, errorCallbackopt)
Retrieves an array of data (name, ids, bounds) for all application windows.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getAppAssetInfo(options, callbackopt, errorCallbackopt)
Retrieves app asset information. Windows
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
|||||||
callback |
function |
<optional> |
called if the method succeeds. |
||||||
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getCommandLineArguments(callbackopt, errorCallbackopt)
Retrieves the command line argument string that started OpenFin Runtime.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getCookies(options, callbackopt, errorCallbackopt)
Get additional info of cookies.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | See tutorial for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getCrashReporterState(callbackopt, errorCallbackopt)
Get the current state of the crash reporter.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
returns startCrashReporterSuccessResponse object. |
errorCallback |
Funciton |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getEntityInfo(uuid, name, callbackopt, errorCallbackopt)
Retrieves a frame info object for the uuid and name passed in
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uuid |
string | The UUID of the target. |
|
name |
string | The name of the target. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getEnvironmentVariable(envVar, callbackopt, errorCallbackopt)
Gets the value of a given environment variable on the computer on which the runtime is installed.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
envVar |
string | The environment variable to expand. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getFocusedWindow(callbackopt, errorCallbackopt)
Get current focused window.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getHostSpecs(callbackopt, errorCallbackopt)
Retrieves system information.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getLog(callbackopt, errorCallbackopt)
Retrieves the contents of the log with the specified filename. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
|
string | The log file name. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getLogList(callbackopt, errorCallbackopt)
Retrieves an array containing information for each log file. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getMachineId(callback, errorCallback)
Returns a unique identifier (UUID) provided by the machine.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | called with the UUID if successful |
errorCallback |
function | called if the UUID is unreadable |
- Tutorials:
(static) getMinLogLevel(callbackopt, errorCallbackopt)
Returns the minimum (inclusive) logging level that is currently being written to the log.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called with the current log level |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getMonitorInfo(callbackopt, errorCallbackopt)
Retrieves an object that contains data about the monitor setup of the computer that the runtime is running on.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getMousePosition(callbackopt, errorCallbackopt)
Returns the mouse in virtual screen coordinates (left, top).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getProcessList(callbackopt, errorCallbackopt)
Retrieves an array of all of the runtime processes that are currently running. Each element in the array is an object containing the uuid and the name of the application to which the process belongs.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getProxySettings(callbackopt, errorCallbackopt)
Retrieves the Proxy settings.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getRuntimeInfo(callbackopt, errorCallbackopt)
Returns information about the running Runtime in an object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getRvmInfo(callbackopt, errorCallbackopt)
Returns information about the running RVM in an object. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) getVersion(callbackopt, errorCallbackopt)
Returns the version of the runtime. The version contains the major, minor, build and revision numbers.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) launchExternalProcess(options, callbackopt, errorCallbackopt)
Runs an executable or batch file.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | See tutorial for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) log(level, message, callbackopt, errorCallbackopt)
Writes the passed message into both the log file and the console.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
level |
string | The log level for the entry. Can be either "info", "warning" or "error". |
|
message |
string | The log message text. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) monitorExternalProcess(options, callbackopt, errorCallbackopt)
Monitors a running process.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | See tutorial for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) openUrlWithBrowser(url, callbackopt, errorCallbackopt)
Opens the passed URL in the default web browser. It only supports http(s) and fin(s) protocols by default. In order to use other custom protocols, they have to be enabled in permission system. File protocol and file path are not supported.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | The URL to open. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) readRegistryValue(rootKey, subkey, value, callbackopt, errorCallbackopt)
Reads the specifed value from the registry. Windows
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
rootKey |
string | The registry root key. |
|
subkey |
string | The registry key. |
|
value |
string | The registry value name. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) registerExternalConnection(uuid, callbackopt, errorCallbackopt)
This function call will register a unique id and produce a token. The token can be used to broker an external connection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uuid |
string | A UUID for the remote connection. |
|
callback |
function |
<optional> |
Called if method succeeds Provides the object with the token and passed uuid |
errorCallback |
function |
<optional> |
Called if method fails |
- Tutorials:
(static) releaseExternalProcess(processUuid, callbackopt, errorCallbackopt)
Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess().
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
processUuid |
string | The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess() |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) removeEventListener(type, listener, callbackopt, errorCallbackopt)
Removes a previously registered event listener from the specified event.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | The type of the event. |
|
listener |
function | Called whenever an event of the specified type occurs. It is passed an event object containing information related to the event. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) setMinLogLevel(level, callbackopt, errorCallbackopt)
Set the minimum log level above which logs will be written to the OpenFin log
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
level |
fin.desktop.System~logLevels | The minimum level (inclusive) above which all calls to log will be written |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) showDeveloperTools(uuid, name, callbackopt, errorCallbackopt)
Shows the Chromium Developer Tools for the specified window.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uuid |
string | The uuid of application. |
|
name |
string | The name of the window. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) startCrashReporter(optionsopt, callbackopt, errorCallbackopt)
Start the crash reporter for the browser process if not already running.
You can optionally specify diagnosticMode
to have the logs sent to
OpenFin on runtime close
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
fin.desktop.System~startCrashReporterOptions |
<optional> |
configure crash reporter |
callback |
function |
<optional> |
returns startCrashReporterSuccessResponse object. |
errorCallback |
Funciton |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) terminateExternalProcess(processUuid, timeout, killTree, callbackopt, errorCallbackopt)
Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
processUuid |
string | The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess(). |
|
timeout |
int | How long to wait in milliseconds for a process to close. Will terminate if it has not done so. |
|
killTree |
boolean | Does the runtime recursively terminate processes that were lunched by the given process ? |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
(static) updateProxySettings(type, address, port, callbackopt, errorCallbackopt)
Update the OpenFin Runtime Proxy settings.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | The proxy type. |
|
address |
string | The configured proxy address. |
|
port |
int | The configured proxy port. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
Type Definitions
clearCacheOptions
Clear cache options.
These are the options required by the clearCache function.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
cache |
boolean | browser data cache for html files and images |
cookies |
boolean | browser cookies |
localStorage |
boolean | browser data that can be used across sessions |
appcache |
boolean | html5 application cache |
downloadRuntimeOptions
Runtime download options.
These are the options object required by the downloadRuntime function.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
version |
string | The given version to download.
|
logLevels
Log verbosity levels.
Describes the minimum level (inclusive) above which logs will be written
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
VERBOSE |
string | all logs written |
INFO |
string | info and above |
WARNING |
string | warning and above |
ERROR |
string | error and above |
FATAL |
string | fatal only, indicates a crash is imminent |
startCrashReporterOptions
Crash reporter options options.
This is the options object required by the startCrashReporter call.
Note the following required properties:
diagnosticMode
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
diagnosticMode |
boolean | In diagnostic mode the crash reporter will send diagnostic logs to the OpenFin reporting service on runtime shutdown |
startCrashReporterSuccessResponse
Response object.
This is the options object returned by the startCrashReporter call.
{runtimeReporter: {isRunning, diagnosticMode}}
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
runtimeReporter |
object | Contains two boolean fields, |