Asynchronously returns an Application object that represents the current application
Synchronously returns an Application object that represents the current application
Creates and starts a new Application.
Retrieves application's manifest and returns a running instance of the application.
The URL of app's manifest.
Optional
opts: RvmLaunchOptionsParameters that the RVM will use.
fin.Application.startFromManifest('http://localhost:5555/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
// For a local manifest file:
fin.Application.startFromManifest('file:///C:/somefolder/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
Experimental
Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls. Returns once the RVM is finished attempting to launch the applications.
Optional
opts: RvmLaunchOptionsParameters that the RVM will use.
const applicationInfoArray = [
{
"uuid": 'App-1',
"manifestUrl": 'http://localhost:5555/app1.json',
},
{
"uuid": 'App-2',
"manifestUrl": 'http://localhost:5555/app2.json',
},
{
"uuid": 'App-3',
"manifestUrl": 'http://localhost:5555/app3.json',
}
]
fin.Application.startManyManifests(applicationInfoArray)
.then(() => {
console.log('RVM has finished launching the application list.');
})
.catch((err) => {
console.log(err);
})
Asynchronously returns an API handle for the given Application identity.
Wrapping an Application identity that does not yet exist will not throw an error, and instead returns a stub object that cannot yet perform rendering tasks. This can be useful for plumbing eventing for an Application throughout its entire lifecycle.
fin.Application.wrap({ uuid: 'testapp' })
.then(app => app.isRunning())
.then(running => console.log('Application is running: ' + running))
.catch(err => console.log(err));
Synchronously returns an API handle for the given Application identity.
Wrapping an Application identity that does not yet exist will not throw an error, and instead returns a stub object that cannot yet perform rendering tasks. This can be useful for plumbing eventing for an Aplication throughout its entire lifecycle.
const app = fin.Application.wrapSync({ uuid: 'testapp' });
await app.close();
Static namespace for OpenFin API methods that interact with the Application class, available under
fin.Application
.