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.
Method Index
Asynchronous
- addEventListener(type, listener, callback, errorCallback)
- clearCache(options, callback, errorCallback)
- deleteCacheOnExit(callback, errorCallback)
- downloadAsset(callback, errorCallback)
- exit(callback, errorCallback)
- getAllApplications(callback, errorCallback)
- getAllExternalApplications(callback, errorCallback)
- getAllWindows(callback, errorCallback)
- getCommandLineArguments(callback, errorCallback)
- getDeviceId(callback, errorCallback)
- getEnvironmentVariable(envVar, callback, errorCallback)
- getLog(log, callback, errorCallback)
- getLogList(callback, errorCallback)
- getMonitorInfo(callback, errorCallback)
- getMousePosition(callback, errorCallback)
- getProcessList(callback, errorCallback)
- getProxySettings(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)
- registerExternalConnection(uuid, callback, errorCallback)
- releaseExternalProcess(processUuid, callback, errorCallback)
- removeEventListener(type, listener, callback, errorCallback)
- showDeveloperTools(uuid, name, callback, errorCallback)
- terminateExternalProcess(processUuid, timeout, killTree, callback, errorCallback)
- updateProxySettings(type, address, port, callback, errorCallback)
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 |
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) deleteCacheOnExit(callbackopt, errorCallbackopt)
Clears all cached data when OpenFin Runtime exits.
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
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) 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) 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) 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) getDeviceId(callbackopt, errorCallbackopt)
Gets the UUID of the computer on which the runtime is installed.
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) 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) getLog(callbackopt, errorCallbackopt)
Retrieves the contents of the log with the specified filename.
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.
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) getMonitorInfo(callbackopt, errorCallbackopt)
Retrieves an object that contains data about the 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) getRvmInfo(callbackopt, errorCallbackopt)
Returns RVM info. Contains version, start time, and TBD.
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.
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) 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) showDeveloperTools(uuid, name, callbackopt, errorCallbackopt)
Shows Developer console for a 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) 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: