Platform
6.16.3The Platform API provides facilities for managing system-level events like restarting or shutting down the io.Connect platform.
The Platform API is accessible via the io.platform object.
Available since io.Connect Desktop 10.0.
APIobject
Description
Platform API.
Methods
onShuttingDownmethod
Signature
(callback: (args: ShuttingDownEventArgs) => Promise<{ prevent: boolean; }>) => () => void
Description
Notifies when the io.Connect platform is about to be shut down or restarted.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| callback | (args: ShuttingDownEventArgs) => Promise<{ prevent: boolean; }> | Callback function for handling the event. You can use this callback to execute custom code
before the platform shuts down or restarts. The available time for the execution of your code is 60 seconds.
To prevent the platform shutdown or restart, the callback must resolve with an object with a |
restartmethod
Signature
(options?: ExitOptions) => Promise<void>
Description
Restarts the io.Connect platform.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| options | ExitOptions | Settings for the restart operation. |
shutdownmethod
Signature
(options?: ExitOptions) => Promise<void>
Description
Shuts down the io.Connect platform.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| options | ExitOptions | Settings for the shutdown operation. |
ExitOptionsobject
Description
Options for platform shutdown or restart.
Properties
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| autoSave | boolean | If |
||
| reason | string | Reason for the platform shutdown or restart. |
||
| showDialog | boolean | If |
ShuttingDownEventArgsobject
Description
Describes the argument received by the callback function for handling the platform shutdown event.
Properties
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| initiator | Instance | Information about the Interop instance that has initiated the platform shutdown or restart. |
||
| reason | string | Reason for the platform shutdown or restart. |
||
| restarting | boolean | Flag indicating whether the platform is being restarted. |