Java 类com.facebook.react.bridge.WebsocketJavaScriptExecutor 实例源码

项目:ReactNativeSignatureExample    文件:DevSupportManagerImpl.java   
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}
项目:react-native-ibeacon-android    文件:DevSupportManagerImpl.java   
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}
项目:react-native-box-loaders    文件:DevSupportManagerImpl.java   
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}