public class ReactBridge extends Countable
| Constructor and Description |
|---|
ReactBridge(JavaScriptExecutor jsExecutor,
ReactCallback callback,
MessageQueueThread nativeModulesQueueThread) |
| Modifier and Type | Method and Description |
|---|---|
void |
callFunction(ExecutorToken executorToken,
int moduleId,
int methodId,
NativeArray arguments,
java.lang.String tracingName) |
void |
destroy() |
void |
dispose() |
long |
getJavaScriptContextNativePtrExperimental()
This method will return a long representing the underlying JSGlobalContextRef pointer or
0 (representing NULL) when in Chrome debug mode, and is only useful if passed back through
the JNI to native code that will use it with the JavaScriptCore C API.
|
ExecutorToken |
getMainExecutorToken() |
void |
handleMemoryPressure(MemoryPressure level) |
void |
invokeCallback(ExecutorToken executorToken,
int callbackID,
NativeArray arguments) |
void |
loadScriptFromAssets(android.content.res.AssetManager assetManager,
java.lang.String assetName)
All native functions are not thread safe and appropriate queues should be used
|
void |
loadScriptFromFile(java.lang.String fileName,
java.lang.String sourceURL) |
void |
setGlobalVariable(java.lang.String propertyName,
java.lang.String jsonEncodedArgument) |
void |
startProfiler(java.lang.String title) |
void |
stopProfiler(java.lang.String title,
java.lang.String filename) |
boolean |
supportsProfiling() |
public ReactBridge(JavaScriptExecutor jsExecutor, ReactCallback callback, MessageQueueThread nativeModulesQueueThread)
jsExecutor - the JS executor to use to run JScallback - the callback class used to invoke native modulesnativeModulesQueueThread - the MessageQueueThread the callbacks should be invoked onpublic void handleMemoryPressure(MemoryPressure level)
public void loadScriptFromAssets(android.content.res.AssetManager assetManager,
java.lang.String assetName)
public void loadScriptFromFile(@Nullable
java.lang.String fileName,
@Nullable
java.lang.String sourceURL)
public void callFunction(ExecutorToken executorToken, int moduleId, int methodId, NativeArray arguments, java.lang.String tracingName)
public void invokeCallback(ExecutorToken executorToken, int callbackID, NativeArray arguments)
public void setGlobalVariable(java.lang.String propertyName,
java.lang.String jsonEncodedArgument)
public boolean supportsProfiling()
public void startProfiler(java.lang.String title)
public void stopProfiler(java.lang.String title,
java.lang.String filename)
public ExecutorToken getMainExecutorToken()
public void destroy()
public long getJavaScriptContextNativePtrExperimental()