CatalystInstanceImpl

This provides an implementation of the public CatalystInstance instance. It is public because it is built by XReactInstanceManager which is in a different package.

Types

Link copied to clipboard
open class Builder
Link copied to clipboard
open class PendingJSCall

Functions

Link copied to clipboard
Adds a idle listener for this Catalyst instance.
Link copied to clipboard
open fun callFunction(module: String, method: String, arguments: NativeArray)
Link copied to clipboard
open fun destroy()
Destroys this catalyst instance, waiting for any other threads in ReactQueueConfiguration (besides the UI thread) to finish running.
Link copied to clipboard
This method and the native below permits a CatalystInstance to extend the known Native modules.
Link copied to clipboard
Link copied to clipboard
Do not use this anymore.
Link copied to clipboard
Returns a hybrid object that contains a pointer to a JS CallInvoker, which is used to schedule work on the JS Thread.
Link copied to clipboard
open fun <T : JavaScriptModule?> getJSModule(jsInterface: Class<T>): T
Link copied to clipboard
Returns a hybrid object that contains a pointer to a NativeMethodCallInvoker, which is used to schedule work on the NativeModules thread.
Link copied to clipboard
open fun <T : NativeModule?> getNativeModule(nativeModuleInterface: Class<T>): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Return the source URL of the JS Bundle that was run, or null if no JS bundle has been run yet.
Link copied to clipboard
open fun handleMemoryPressure(level: Int)
Called when the system generates a memory warning.
Link copied to clipboard
open fun <T : NativeModule?> hasNativeModule(nativeModuleInterface: Class<T>): Boolean
Link copied to clipboard
Link copied to clipboard
open fun initialize()
Initialize all the native modules
Link copied to clipboard
open fun invokeCallback(callbackID: Int, arguments: NativeArrayInterface)
Link copied to clipboard
open fun isDestroyed(): Boolean
Link copied to clipboard
open fun loadScriptFromAssets(assetManager: AssetManager, assetURL: String, loadSynchronously: Boolean)
Load a JS bundle from Android assets.
Link copied to clipboard
open fun loadScriptFromFile(fileName: String, sourceURL: String, loadSynchronously: Boolean)
Load a JS bundle from the filesystem.
Link copied to clipboard
open fun loadSplitBundleFromFile(fileName: String, sourceURL: String)
Load a split JS bundle from the filesystem.
Link copied to clipboard
open fun registerSegment(segmentId: Int, path: String)
This method registers the file path of an additional JS segment by its ID.
Link copied to clipboard
Removes a NotThreadSafeBridgeIdleDebugListener previously added with addBridgeIdleDebugListener
Link copied to clipboard
open fun runJSBundle()
Link copied to clipboard
open fun setFabricUIManager(fabricUIManager: UIManager)
Link copied to clipboard
open fun setGlobalVariable(propName: String, jsonValue: String)
Link copied to clipboard
open fun setSourceURLs(deviceURL: String, remoteURL: String)
This API is used in situations where the JS bundle is being executed not on the device, but on a host machine.
Link copied to clipboard
open fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry)