diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 45d13348..67650d29 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -89,17 +89,6 @@ set(ALL_SOURCE_LIST
wedpr-computing/ppc-psi wedpr-computing/ppc-mpc wedpr-computing/ppc-pir ${CEM_SOURCE}
wedpr-initializer wedpr-main)
-if(BUILD_WEDPR_TOOLKIT)
- # fetch the python dependencies
- option(FETCH_PYTHON_DEPS "Install python required modules if not available" ON)
- message(STATUS "Python fetch dependencies: ${FETCH_PYTHON_DEPS}")
- if(WIN32)
- message(STATUS "Getting SWIG for Windows: ...")
- include(swig)
- message(STATUS "Getting SWIG for Windows: ...DONE")
- endif()
-endif()
-
if(BUILD_ALL)
add_sources("${ALL_SOURCE_LIST}")
elseif(BUILD_UDF)
diff --git a/cpp/wedpr-transport/sdk-wrapper/CMakeLists.txt b/cpp/wedpr-transport/sdk-wrapper/CMakeLists.txt
index 08c97539..e1d6cf3d 100644
--- a/cpp/wedpr-transport/sdk-wrapper/CMakeLists.txt
+++ b/cpp/wedpr-transport/sdk-wrapper/CMakeLists.txt
@@ -6,6 +6,9 @@ include(${SWIG_USE_FILE})
# Add subdirectories for each language if desired
option(BUILD_PYTHON "Build Python SWIG module" ON)
if(BUILD_PYTHON)
+ # fetch the python dependencies
+ option(FETCH_PYTHON_DEPS "Install python required modules if not available" ON)
+ message(STATUS "Python fetch dependencies: ${FETCH_PYTHON_DEPS}")
include(python)
add_subdirectory(python)
endif()
@@ -13,6 +16,5 @@ endif()
# Add subdirectories for each language if desired
option(BUILD_JAVA "Build JAVA SWIG module" ON)
if(BUILD_JAVA)
- include(java)
add_subdirectory(java)
endif()
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/CMakeLists.txt b/cpp/wedpr-transport/sdk-wrapper/java/CMakeLists.txt
index 9276c9e6..a184200f 100644
--- a/cpp/wedpr-transport/sdk-wrapper/java/CMakeLists.txt
+++ b/cpp/wedpr-transport/sdk-wrapper/java/CMakeLists.txt
@@ -1,19 +1,32 @@
-file(GLOB_RECURSE SRCS wedpr_java_transport.i)
-set_source_files_properties(${SRCS} PROPERTIES CPLUSPLUS ON)
-
-set(WEDPR_TRANSPORT_PACKAGE "com.webank.wedpr.sdk.jni.generated")
-
-set_property(SOURCE swig/wedpr_java_transport.i PROPERTY COMPILE_OPTIONS
- -package ${WEDPR_TRANSPORT_PACKAGE})
-
-file(MAKE_DIRECTORY ${WEDPR_JAVA_TRANSPORT_DIR})
-file(MAKE_DIRECTORY ${WEDPR_JAVA_TRANSPORT_LIB_DIR})
-
-swig_add_library(${WEDPR_JAVA_TRANSPORT}
- TYPE MODULE
- LANGUAGE java
- OUTPUT_DIR ${WEDPR_JAVA_TRANSPORT_DIR}
- SOURCES ${SRCS})
+option(AUTO_GENERATE "Auto generate the targes" OFF)
+if(AUTO_GENERATE)
+ if(WIN32)
+ message(STATUS "Getting SWIG for Windows: ...")
+ include(swig)
+ message(STATUS "Getting SWIG for Windows: ...DONE")
+ endif()
+ # only auto-generate should find swig
+ include(java)
+ file(GLOB_RECURSE SRCS wedpr_java_transport.i)
+ set_source_files_properties(${SRCS} PROPERTIES CPLUSPLUS ON)
+
+ set(WEDPR_TRANSPORT_PACKAGE "com.webank.wedpr.sdk.jni.generated")
+
+ set_property(SOURCE swig/wedpr_java_transport.i PROPERTY COMPILE_OPTIONS
+ -package ${WEDPR_TRANSPORT_PACKAGE})
+
+ file(MAKE_DIRECTORY ${WEDPR_JAVA_TRANSPORT_DIR})
+ file(MAKE_DIRECTORY ${WEDPR_JAVA_TRANSPORT_LIB_DIR})
+
+ swig_add_library(${WEDPR_JAVA_TRANSPORT}
+ TYPE MODULE
+ LANGUAGE java
+ OUTPUT_DIR ${WEDPR_JAVA_TRANSPORT_DIR}
+ SOURCES ${SRCS})
+else()
+ file(GLOB_RECURSE SRCS src/*.cxx)
+ add_library(${WEDPR_JAVA_TRANSPORT} SHARED ${SRCS})
+endif()
SET(LIBRARY_OUTPUT_PATH ${WEDPR_JAVA_TRANSPORT_LIB_DIR})
message("LIBRARY_OUTPUT_PATH: ${WEDPR_JAVA_TRANSPORT_LIB_DIR}")
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/bindings/build.gradle b/cpp/wedpr-transport/sdk-wrapper/java/bindings/build.gradle
index 67e5940e..362b0ba3 100644
--- a/cpp/wedpr-transport/sdk-wrapper/java/bindings/build.gradle
+++ b/cpp/wedpr-transport/sdk-wrapper/java/bindings/build.gradle
@@ -7,6 +7,9 @@ plugins {
id "de.undercouch.download" version "4.1.2"
id 'com.github.sherter.google-java-format' version '0.9'
}
+apply plugin: 'maven-publish'
+apply plugin: 'java'
+apply plugin: 'signing'
// Additional attribute definition
ext {
@@ -93,7 +96,7 @@ version = '1.0.0-SNAPSHOT'
jar {
exclude '**/*.xml'
exclude '**/*.properties'
- /*manifest {
+ manifest {
try {
def repo = grgit.open(currentDir: project.rootDir)
if (repo != null) {
@@ -109,7 +112,7 @@ jar {
} catch (Exception e) {
e.printStackTrace()
}
- } from sourceSets.main.output*/
+ } from sourceSets.main.output
doLast {
copy {
@@ -164,7 +167,7 @@ publishing {
pom {
name = 'wedpr'
- description = 'wedpr java transport jni'
+ description = 'wedpr java gateway sdk'
url = 'http://www.fisco-bcos.org'
licenses {
@@ -200,7 +203,8 @@ publishing {
password 'deployment123'
}
}
+ signing {
+ sign publishing.publications.mavenJava
+ }
}
-
}
-
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/bindings/settings.gradle b/cpp/wedpr-transport/sdk-wrapper/java/bindings/settings.gradle
index 5c90d6b7..4a6f5d4e 100644
--- a/cpp/wedpr-transport/sdk-wrapper/java/bindings/settings.gradle
+++ b/cpp/wedpr-transport/sdk-wrapper/java/bindings/settings.gradle
@@ -1,2 +1,2 @@
-rootProject.name = 'wedpr-java-transport-jni'
+rootProject.name = 'wedpr-gateway-sdk'
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/common/JniLibLoader.java b/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/common/JniLibLoader.java
index f30e9165..ff34a1de 100644
--- a/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/common/JniLibLoader.java
+++ b/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/common/JniLibLoader.java
@@ -101,9 +101,9 @@ public static String getLibName(String baseName) {
} else if (osName.contains(MAC)) {
String arch = getArch();
if ("arm".equals(arch)) {
- return "lib" + baseName + "-aarch64" + ".jnilib";
+ return "lib" + baseName + "-aarch64" + ".dylib";
}
- return "lib" + baseName + ".jnilib";
+ return "lib" + baseName + ".dylib";
} else {
throw new RuntimeException("unrecognized OS: " + osName);
}
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/generated/IFrontClient.java b/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/generated/IFrontClient.java
index ac777ec8..a9d97546 100644
--- a/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/generated/IFrontClient.java
+++ b/cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/java/com/webank/wedpr/sdk/jni/generated/IFrontClient.java
@@ -43,8 +43,6 @@ public synchronized void delete() {
/**
* : receive message from gateway, call by gateway
*
- *
- * @return void
*/
public void onReceiveMessage(
Message _msg,
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.cxx b/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.cxx
new file mode 100644
index 00000000..66ff9162
--- /dev/null
+++ b/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.cxx
@@ -0,0 +1,6763 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (https://www.swig.org).
+ * Version 4.2.1
+ *
+ * Do not make changes to this file unless you know what you are doing - modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+
+#define SWIG_VERSION 0x040201
+#define SWIGJAVA
+#define SWIG_DIRECTORS
+
+/* -----------------------------------------------------------------------------
+ * This section contains generic SWIG labels for method/variable
+ * declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+# define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+# define SWIGINLINE inline
+# else
+# define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+# elif defined(__ICC)
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+# pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+# define SWIGUNUSEDPARM(p)
+# else
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if defined(__GNUC__)
+# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# ifndef GCC_HASCLASSVISIBILITY
+# define GCC_HASCLASSVISIBILITY
+# endif
+# endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# if defined(STATIC_LINKED)
+# define SWIGEXPORT
+# else
+# define SWIGEXPORT __declspec(dllexport)
+# endif
+# else
+# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+# define SWIGEXPORT __attribute__ ((visibility("default")))
+# else
+# define SWIGEXPORT
+# endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# define SWIGSTDCALL __stdcall
+# else
+# define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used. So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
+
+#if defined(__cplusplus) && __cplusplus >=201103L
+# define SWIG_NULLPTR nullptr
+#else
+# define SWIG_NULLPTR NULL
+#endif
+
+/* -----------------------------------------------------------------------------
+ * swigcompat.swg
+ *
+ * Macros to provide support compatibility with older C and C++ standards.
+ * ----------------------------------------------------------------------------- */
+
+/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
+ * if you're missing it.
+ */
+#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
+ (defined __cplusplus && __cplusplus >= 201103L) || \
+ defined SWIG_HAVE_SNPRINTF) && \
+ !defined SWIG_NO_SNPRINTF
+# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
+# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
+#else
+/* Fallback versions ignore the buffer size, but most of our uses either have a
+ * fixed maximum possible size or dynamically allocate a buffer that's large
+ * enough.
+ */
+# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
+# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
+#endif
+
+
+#include
+#include
+#include
+
+
+/* Support for throwing Java exceptions */
+typedef enum {
+ SWIG_JavaOutOfMemoryError = 1,
+ SWIG_JavaIOException,
+ SWIG_JavaRuntimeException,
+ SWIG_JavaIndexOutOfBoundsException,
+ SWIG_JavaArithmeticException,
+ SWIG_JavaIllegalArgumentException,
+ SWIG_JavaNullPointerException,
+ SWIG_JavaDirectorPureVirtual,
+ SWIG_JavaUnknownError,
+ SWIG_JavaIllegalStateException,
+} SWIG_JavaExceptionCodes;
+
+typedef struct {
+ SWIG_JavaExceptionCodes code;
+ const char *java_exception;
+} SWIG_JavaExceptions_t;
+
+
+static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
+ jclass excep;
+ static const SWIG_JavaExceptions_t java_exceptions[] = {
+ { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
+ { SWIG_JavaIOException, "java/io/IOException" },
+ { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
+ { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
+ { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
+ { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
+ { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
+ { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
+ { SWIG_JavaUnknownError, "java/lang/UnknownError" },
+ { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
+ { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
+ };
+ const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
+
+ while (except_ptr->code != code && except_ptr->code)
+ except_ptr++;
+
+ jenv->ExceptionClear();
+ excep = jenv->FindClass(except_ptr->java_exception);
+ if (excep)
+ jenv->ThrowNew(excep, msg);
+}
+
+
+/* Contract support */
+
+#define SWIG_contract_assert(nullreturn, expr, msg) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0)
+
+/* -----------------------------------------------------------------------------
+ * director_common.swg
+ *
+ * This file contains support for director classes which is common between
+ * languages.
+ * ----------------------------------------------------------------------------- */
+
+/*
+ Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the
+ 'Swig' namespace. This could be useful for multi-modules projects.
+*/
+#ifdef SWIG_DIRECTOR_STATIC
+/* Force anonymous (static) namespace */
+#define Swig
+#endif
+/* -----------------------------------------------------------------------------
+ * director.swg
+ *
+ * This file contains support for director classes so that Java proxy
+ * methods can be called from C++.
+ * ----------------------------------------------------------------------------- */
+
+#if defined(DEBUG_DIRECTOR_OWNED) || defined(DEBUG_DIRECTOR_EXCEPTION) || defined(DEBUG_DIRECTOR_THREAD_NAME)
+#include
+#endif
+
+#include
+
+#if defined(SWIG_JAVA_USE_THREAD_NAME)
+
+#if !defined(SWIG_JAVA_GET_THREAD_NAME)
+namespace Swig {
+ SWIGINTERN int GetThreadName(char *name, size_t len);
+}
+
+#if defined(__linux__)
+
+#include
+SWIGINTERN int Swig::GetThreadName(char *name, size_t len) {
+ (void)len;
+#if defined(PR_GET_NAME)
+ return prctl(PR_GET_NAME, (unsigned long)name, 0, 0, 0);
+#else
+ (void)name;
+ return 1;
+#endif
+}
+
+#elif defined(__unix__) || defined(__APPLE__)
+
+#include
+SWIGINTERN int Swig::GetThreadName(char *name, size_t len) {
+ return pthread_getname_np(pthread_self(), name, len);
+}
+
+#else
+
+SWIGINTERN int Swig::GetThreadName(char *name, size_t len) {
+ (void)len;
+ (void)name;
+ return 1;
+}
+#endif
+
+#endif
+
+#endif
+
+#if defined(SWIG_JAVA_DETACH_ON_THREAD_END)
+#include
+#endif
+
+namespace Swig {
+
+ /* Java object wrapper */
+ class JObjectWrapper {
+ public:
+ JObjectWrapper() : jthis_(SWIG_NULLPTR), weak_global_(true) {
+ }
+
+ ~JObjectWrapper() {
+ jthis_ = SWIG_NULLPTR;
+ weak_global_ = true;
+ }
+
+ bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) {
+ if (!jthis_) {
+ weak_global_ = weak_global || !mem_own; // hold as weak global if explicitly requested or not owned
+ if (jobj)
+ jthis_ = weak_global_ ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj);
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl;
+#endif
+ return true;
+ } else {
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl;
+#endif
+ return false;
+ }
+ }
+
+ jobject get(JNIEnv *jenv) const {
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "JObjectWrapper::get(";
+ if (jthis_)
+ std::cout << jthis_;
+ else
+ std::cout << "null";
+ std::cout << ") -> return new local ref" << std::endl;
+#endif
+ return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_);
+ }
+
+ void release(JNIEnv *jenv) {
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl;
+#endif
+ if (jthis_) {
+ if (weak_global_) {
+ if (jenv->IsSameObject(jthis_, SWIG_NULLPTR) == JNI_FALSE)
+ jenv->DeleteWeakGlobalRef((jweak)jthis_);
+ } else
+ jenv->DeleteGlobalRef(jthis_);
+ }
+
+ jthis_ = SWIG_NULLPTR;
+ weak_global_ = true;
+ }
+
+ /* Only call peek if you know what you are doing wrt to weak/global references */
+ jobject peek() {
+ return jthis_;
+ }
+
+ /* Java proxy releases ownership of C++ object, C++ object is now
+ responsible for destruction (creates NewGlobalRef to pin Java proxy) */
+ void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) {
+ if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */
+ if (!weak_global_) {
+ jenv->DeleteGlobalRef(jthis_);
+ jthis_ = jenv->NewWeakGlobalRef(jself);
+ weak_global_ = true;
+ }
+ } else {
+ /* Java releases ownership of C++ object's lifetime */
+ if (weak_global_) {
+ jenv->DeleteWeakGlobalRef((jweak)jthis_);
+ jthis_ = jenv->NewGlobalRef(jself);
+ weak_global_ = false;
+ }
+ }
+ }
+
+#if defined(SWIG_JAVA_DETACH_ON_THREAD_END)
+ static void detach(void *jvm) {
+ static_cast(jvm)->DetachCurrentThread();
+ }
+
+ static void make_detach_key() {
+ pthread_key_create(&detach_key_, detach);
+ }
+
+ /* thread-local key to register a destructor */
+ static pthread_key_t detach_key_;
+#endif
+
+ private:
+ /* pointer to Java object */
+ jobject jthis_;
+ /* Local or global reference flag */
+ bool weak_global_;
+ };
+
+#if defined(SWIG_JAVA_DETACH_ON_THREAD_END)
+ pthread_key_t JObjectWrapper::detach_key_;
+#endif
+
+ /* Local JNI reference deleter */
+ class LocalRefGuard {
+ JNIEnv *jenv_;
+ jobject jobj_;
+
+ // non-copyable
+ LocalRefGuard(const LocalRefGuard &);
+ LocalRefGuard &operator=(const LocalRefGuard &);
+ public:
+ LocalRefGuard(JNIEnv *jenv, jobject jobj): jenv_(jenv), jobj_(jobj) {}
+ ~LocalRefGuard() {
+ if (jobj_)
+ jenv_->DeleteLocalRef(jobj_);
+ }
+ };
+
+ /* director base class */
+ class Director {
+ /* pointer to Java virtual machine */
+ JavaVM *swig_jvm_;
+
+ protected:
+#if defined (_MSC_VER) && (_MSC_VER<1300)
+ class JNIEnvWrapper;
+ friend class JNIEnvWrapper;
+#endif
+ /* Utility class for managing the JNI environment */
+ class JNIEnvWrapper {
+ const Director *director_;
+ JNIEnv *jenv_;
+ int env_status;
+ public:
+ JNIEnvWrapper(const Director *director) : director_(director), jenv_(SWIG_NULLPTR), env_status(0) {
+#if defined(__ANDROID__)
+ JNIEnv **jenv = &jenv_;
+#else
+ void **jenv = (void **)&jenv_;
+#endif
+ env_status = director_->swig_jvm_->GetEnv((void **)&jenv_, JNI_VERSION_1_2);
+ JavaVMAttachArgs args;
+ args.version = JNI_VERSION_1_2;
+ args.group = SWIG_NULLPTR;
+ args.name = SWIG_NULLPTR;
+#if defined(SWIG_JAVA_USE_THREAD_NAME)
+ char thread_name[64]; // MAX_TASK_COMM_LEN=16 is hard-coded in the Linux kernel and MacOS has MAXTHREADNAMESIZE=64.
+ if (Swig::GetThreadName(thread_name, sizeof(thread_name)) == 0) {
+ args.name = thread_name;
+#if defined(DEBUG_DIRECTOR_THREAD_NAME)
+ std::cout << "JNIEnvWrapper: thread name: " << thread_name << std::endl;
+ } else {
+ std::cout << "JNIEnvWrapper: Couldn't set Java thread name" << std::endl;
+#endif
+ }
+#endif
+#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON)
+ // Attach a daemon thread to the JVM. Useful when the JVM should not wait for
+ // the thread to exit upon shutdown. Only for jdk-1.4 and later.
+ director_->swig_jvm_->AttachCurrentThreadAsDaemon(jenv, &args);
+#else
+ director_->swig_jvm_->AttachCurrentThread(jenv, &args);
+#endif
+
+#if defined(SWIG_JAVA_DETACH_ON_THREAD_END)
+ // At least on Android 6, detaching after every call causes a memory leak.
+ // Instead, register a thread desructor and detach only when the thread ends.
+ // See https://developer.android.com/training/articles/perf-jni#threads
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
+
+ pthread_once(&once, JObjectWrapper::make_detach_key);
+ pthread_setspecific(JObjectWrapper::detach_key_, director->swig_jvm_);
+#endif
+ }
+ ~JNIEnvWrapper() {
+#if !defined(SWIG_JAVA_DETACH_ON_THREAD_END) && !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD)
+ // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call.
+ // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak.
+ if (env_status == JNI_EDETACHED)
+ director_->swig_jvm_->DetachCurrentThread();
+#endif
+ }
+ JNIEnv *getJNIEnv() const {
+ return jenv_;
+ }
+ };
+
+ struct SwigDirectorMethod {
+ const char *name;
+ const char *desc;
+ jmethodID methid;
+ SwigDirectorMethod(JNIEnv *jenv, jclass baseclass, const char *name, const char *desc) : name(name), desc(desc) {
+ methid = jenv->GetMethodID(baseclass, name, desc);
+ }
+ };
+
+ /* Java object wrapper */
+ JObjectWrapper swig_self_;
+
+ /* Disconnect director from Java object */
+ void swig_disconnect_director_self(const char *disconn_method) {
+ JNIEnvWrapper jnienv(this) ;
+ JNIEnv *jenv = jnienv.getJNIEnv() ;
+ jobject jobj = swig_self_.get(jenv);
+ LocalRefGuard ref_deleter(jenv, jobj);
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl;
+#endif
+ if (jobj && jenv->IsSameObject(jobj, SWIG_NULLPTR) == JNI_FALSE) {
+ jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V");
+ if (disconn_meth) {
+#if defined(DEBUG_DIRECTOR_OWNED)
+ std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl;
+#endif
+ jenv->CallVoidMethod(jobj, disconn_meth);
+ }
+ }
+ }
+
+ jclass swig_new_global_ref(JNIEnv *jenv, const char *classname) {
+ jclass clz = jenv->FindClass(classname);
+ return clz ? (jclass)jenv->NewGlobalRef(clz) : SWIG_NULLPTR;
+ }
+
+ public:
+ Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) SWIG_NULLPTR), swig_self_() {
+ /* Acquire the Java VM pointer */
+ jenv->GetJavaVM(&swig_jvm_);
+ }
+
+ virtual ~Director() {
+ JNIEnvWrapper jnienv(this) ;
+ JNIEnv *jenv = jnienv.getJNIEnv() ;
+ swig_self_.release(jenv);
+ }
+
+ bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) {
+ return swig_self_.set(jenv, jself, mem_own, weak_global);
+ }
+
+ jobject swig_get_self(JNIEnv *jenv) const {
+ return swig_self_.get(jenv);
+ }
+
+ // Change C++ object's ownership, relative to Java
+ void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) {
+ swig_self_.java_change_ownership(jenv, jself, take_or_release);
+ }
+ };
+
+ // Zero initialized bool array
+ template class BoolArray {
+ bool array_[N];
+ public:
+ BoolArray() {
+ memset(array_, 0, sizeof(array_));
+ }
+ bool& operator[](size_t n) {
+ return array_[n];
+ }
+ bool operator[](size_t n) const {
+ return array_[n];
+ }
+ };
+
+ // Utility classes and functions for exception handling.
+
+ // Simple holder for a Java string during exception handling, providing access to a c-style string
+ class JavaString {
+ public:
+ JavaString(JNIEnv *jenv, jstring jstr) : jenv_(jenv), jstr_(jstr), cstr_(SWIG_NULLPTR) {
+ if (jenv_ && jstr_)
+ cstr_ = (const char *) jenv_->GetStringUTFChars(jstr_, SWIG_NULLPTR);
+ }
+
+ ~JavaString() {
+ if (jenv_ && jstr_ && cstr_)
+ jenv_->ReleaseStringUTFChars(jstr_, cstr_);
+ }
+
+ const char *c_str(const char *null_string = "null JavaString") const {
+ return cstr_ ? cstr_ : null_string;
+ }
+
+ private:
+ // non-copyable
+ JavaString(const JavaString &);
+ JavaString &operator=(const JavaString &);
+
+ JNIEnv *jenv_;
+ jstring jstr_;
+ const char *cstr_;
+ };
+
+ // Helper class to extract the exception message from a Java throwable
+ class JavaExceptionMessage {
+ public:
+ JavaExceptionMessage(JNIEnv *jenv, jthrowable throwable) : message_(jenv, exceptionMessageFromThrowable(jenv, throwable)) {
+ }
+
+ // Return a C string of the exception message in the jthrowable passed in the constructor
+ // If no message is available, null_string is return instead
+ const char *message(const char *null_string = "Could not get exception message in JavaExceptionMessage") const {
+ return message_.c_str(null_string);
+ }
+
+ private:
+ // non-copyable
+ JavaExceptionMessage(const JavaExceptionMessage &);
+ JavaExceptionMessage &operator=(const JavaExceptionMessage &);
+
+ // Get exception message by calling Java method Throwable.getMessage()
+ static jstring exceptionMessageFromThrowable(JNIEnv *jenv, jthrowable throwable) {
+ jstring jmsg = SWIG_NULLPTR;
+ if (jenv && throwable) {
+ jenv->ExceptionClear(); // Cannot invoke methods with any pending exceptions
+ jclass throwclz = jenv->GetObjectClass(throwable);
+ if (throwclz) {
+ // All Throwable classes have a getMessage() method, so call it to extract the exception message
+ jmethodID getMessageMethodID = jenv->GetMethodID(throwclz, "getMessage", "()Ljava/lang/String;");
+ if (getMessageMethodID)
+ jmsg = (jstring)jenv->CallObjectMethod(throwable, getMessageMethodID);
+ }
+ if (jmsg == SWIG_NULLPTR && jenv->ExceptionCheck())
+ jenv->ExceptionClear();
+ }
+ return jmsg;
+ }
+
+ JavaString message_;
+ };
+
+ // C++ Exception class for handling Java exceptions thrown during a director method Java upcall
+ class DirectorException : public std::exception {
+ public:
+
+ // Construct exception from a Java throwable
+ DirectorException(JNIEnv *jenv, jthrowable throwable) : jenv_(jenv), throwable_(throwable), classname_(SWIG_NULLPTR), msg_(SWIG_NULLPTR) {
+
+ // Call Java method Object.getClass().getName() to obtain the throwable's class name (delimited by '/')
+ if (jenv && throwable) {
+ jenv->ExceptionClear(); // Cannot invoke methods with any pending exceptions
+ jclass throwclz = jenv->GetObjectClass(throwable);
+ if (throwclz) {
+ jclass clzclz = jenv->GetObjectClass(throwclz);
+ if (clzclz) {
+ jmethodID getNameMethodID = jenv->GetMethodID(clzclz, "getName", "()Ljava/lang/String;");
+ if (getNameMethodID) {
+ jstring jstr_classname = (jstring)(jenv->CallObjectMethod(throwclz, getNameMethodID));
+ // Copy strings, since there is no guarantee that jenv will be active when handled
+ if (jstr_classname) {
+ JavaString jsclassname(jenv, jstr_classname);
+ const char *classname = jsclassname.c_str(SWIG_NULLPTR);
+ if (classname)
+ classname_ = copypath(classname);
+ }
+ }
+ }
+ }
+ }
+
+ JavaExceptionMessage exceptionmsg(jenv, throwable);
+ msg_ = copystr(exceptionmsg.message(SWIG_NULLPTR));
+ }
+
+ // More general constructor for handling as a java.lang.RuntimeException
+ DirectorException(const char *msg) : jenv_(SWIG_NULLPTR), throwable_(SWIG_NULLPTR), classname_(SWIG_NULLPTR), msg_(msg ? copystr(msg) : SWIG_NULLPTR) {
+ }
+
+ ~DirectorException() throw() {
+ delete[] classname_;
+ delete[] msg_;
+ }
+
+ const char *what() const throw() {
+ return msg_ ? msg_ : "Unspecified DirectorException message";
+ }
+
+ // Reconstruct and raise/throw the Java Exception that caused the DirectorException
+ // Note that any error in the JNI exception handling results in a Java RuntimeException
+ void throwException(JNIEnv *jenv) const {
+ if (jenv) {
+ if (jenv == jenv_ && throwable_) {
+ // Throw original exception if not already pending
+ jthrowable throwable = jenv->ExceptionOccurred();
+ if (throwable && jenv->IsSameObject(throwable, throwable_) == JNI_FALSE) {
+ jenv->ExceptionClear();
+ throwable = SWIG_NULLPTR;
+ }
+ if (!throwable)
+ jenv->Throw(throwable_);
+ } else {
+ // Try and reconstruct original exception, but original stacktrace is not reconstructed
+ jenv->ExceptionClear();
+
+ jmethodID ctorMethodID = SWIG_NULLPTR;
+ jclass throwableclass = SWIG_NULLPTR;
+ if (classname_) {
+ throwableclass = jenv->FindClass(classname_);
+ if (throwableclass)
+ ctorMethodID = jenv->GetMethodID(throwableclass, "", "(Ljava/lang/String;)V");
+ }
+
+ if (ctorMethodID) {
+ jenv->ThrowNew(throwableclass, what());
+ } else {
+ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, what());
+ }
+ }
+ }
+ }
+
+ // Deprecated - use throwException
+ void raiseJavaException(JNIEnv *jenv) const {
+ throwException(jenv);
+ }
+
+ // Create and throw the DirectorException
+ static void raise(JNIEnv *jenv, jthrowable throwable) {
+ throw DirectorException(jenv, throwable);
+ }
+
+ private:
+ static char *copypath(const char *srcmsg) {
+ char *target = copystr(srcmsg);
+ for (char *c=target; *c; ++c) {
+ if ('.' == *c)
+ *c = '/';
+ }
+ return target;
+ }
+
+ static char *copystr(const char *srcmsg) {
+ char *target = SWIG_NULLPTR;
+ if (srcmsg) {
+ size_t msglen = strlen(srcmsg) + 1;
+ target = new char[msglen];
+ strncpy(target, srcmsg, msglen);
+ }
+ return target;
+ }
+
+ JNIEnv *jenv_;
+ jthrowable throwable_;
+ const char *classname_;
+ const char *msg_;
+ };
+
+ // Helper method to determine if a Java throwable matches a particular Java class type
+ // Note side effect of clearing any pending exceptions
+ SWIGINTERN bool ExceptionMatches(JNIEnv *jenv, jthrowable throwable, const char *classname) {
+ bool matches = false;
+
+ if (throwable && jenv && classname) {
+ // Exceptions need to be cleared for correct behavior.
+ // The caller of ExceptionMatches should restore pending exceptions if desired -
+ // the caller already has the throwable.
+ jenv->ExceptionClear();
+
+ jclass clz = jenv->FindClass(classname);
+ if (clz) {
+ jclass classclz = jenv->GetObjectClass(clz);
+ jmethodID isInstanceMethodID = jenv->GetMethodID(classclz, "isInstance", "(Ljava/lang/Object;)Z");
+ if (isInstanceMethodID) {
+ matches = jenv->CallBooleanMethod(clz, isInstanceMethodID, throwable) != 0;
+ }
+ }
+
+#if defined(DEBUG_DIRECTOR_EXCEPTION)
+ if (jenv->ExceptionCheck()) {
+ // Typically occurs when an invalid classname argument is passed resulting in a ClassNotFoundException
+ JavaExceptionMessage exc(jenv, jenv->ExceptionOccurred());
+ std::cout << "Error: ExceptionMatches: class '" << classname << "' : " << exc.message() << std::endl;
+ }
+#endif
+ }
+ return matches;
+ }
+}
+
+namespace Swig {
+ namespace {
+ jclass jclass_wedpr_java_transportJNI = NULL;
+ jmethodID director_method_ids[3];
+ }
+}
+
+#ifdef __cplusplus
+#include
+/* SwigValueWrapper is described in swig.swg */
+template class SwigValueWrapper {
+ struct SwigSmartPointer {
+ T *ptr;
+ SwigSmartPointer(T *p) : ptr(p) { }
+ ~SwigSmartPointer() { delete ptr; }
+ SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+ void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
+ } pointer;
+ SwigValueWrapper& operator=(const SwigValueWrapper& rhs);
+ SwigValueWrapper(const SwigValueWrapper& rhs);
+public:
+ SwigValueWrapper() : pointer(0) { }
+ SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
+#if __cplusplus >=201103L
+ SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
+ operator T&&() const { return std::move(*pointer.ptr); }
+#else
+ operator T&() const { return *pointer.ptr; }
+#endif
+ T *operator&() const { return pointer.ptr; }
+ static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
+};
+
+/*
+ * SwigValueInit() is a generic initialisation solution as the following approach:
+ *
+ * T c_result = T();
+ *
+ * doesn't compile for all types for example:
+ *
+ * unsigned int c_result = unsigned int();
+ */
+template T SwigValueInit() {
+ return T();
+}
+
+#if __cplusplus >=201103L
+# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
+#else
+# define SWIG_STD_MOVE(OBJ) OBJ
+#endif
+
+#endif
+
+
+#include // Use the C99 official header
+
+
+#include
+#include
+
+
+#include
+#include
+
+
+#include
+
+
+#define SWIG_FILE_WITH_INIT
+#include
+#include
+#include
+#include "wedpr-transport/sdk/src/TransportBuilder.h"
+#include "wedpr-transport/sdk/src/Transport.h"
+#include "ppc-framework/libwrapper/Buffer.h"
+#include "ppc-framework/front/IFront.h"
+#include "ppc-framework/protocol/RouteType.h"
+#include "ppc-framework/front/FrontConfig.h"
+#include "ppc-framework/protocol/GrpcConfig.h"
+#include
+#include "ppc-framework/protocol/EndPoint.h"
+#include "ppc-framework/protocol/Message.h"
+#include "ppc-framework/protocol/MessagePayload.h"
+
+
+/* Check for overflow converting to Java int (always signed 32-bit) from (unsigned variable-bit) size_t */
+SWIGINTERN jint SWIG_JavaIntFromSize_t(size_t size) {
+ static const jint JINT_MAX = 0x7FFFFFFF;
+ return (size > (size_t)JINT_MAX) ? -1 : (jint)size;
+}
+
+
+SWIGINTERN jint SWIG_VectorSize(size_t size) {
+ jint sz = SWIG_JavaIntFromSize_t(size);
+ if (sz == -1)
+ throw std::out_of_range("vector size is too large to fit into a Java int");
+ return sz;
+}
+
+SWIGINTERN std::vector< uint8_t > *new_std_vector_Sl_uint8_t_Sg___SWIG_2(jint count,unsigned char const &value){
+ if (count < 0)
+ throw std::out_of_range("vector count must be positive");
+ return new std::vector< unsigned char >(static_cast::size_type>(count), value);
+ }
+SWIGINTERN jint std_vector_Sl_uint8_t_Sg__doCapacity(std::vector< uint8_t > *self){
+ return SWIG_VectorSize(self->capacity());
+ }
+SWIGINTERN void std_vector_Sl_uint8_t_Sg__doReserve(std::vector< uint8_t > *self,jint n){
+ if (n < 0)
+ throw std::out_of_range("vector reserve size must be positive");
+ self->reserve(n);
+ }
+SWIGINTERN jint std_vector_Sl_uint8_t_Sg__doSize(std::vector< uint8_t > const *self){
+ return SWIG_VectorSize(self->size());
+ }
+SWIGINTERN void std_vector_Sl_uint8_t_Sg__doAdd__SWIG_0(std::vector< uint8_t > *self,std::vector< unsigned char >::value_type const &x){
+ self->push_back(x);
+ }
+SWIGINTERN void std_vector_Sl_uint8_t_Sg__doAdd__SWIG_1(std::vector< uint8_t > *self,jint index,std::vector< unsigned char >::value_type const &x){
+ jint size = static_cast(self->size());
+ if (0 <= index && index <= size) {
+ self->insert(self->begin() + index, x);
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+SWIGINTERN std::vector< unsigned char >::value_type std_vector_Sl_uint8_t_Sg__doRemove(std::vector< uint8_t > *self,jint index){
+ jint size = static_cast(self->size());
+ if (0 <= index && index < size) {
+ unsigned char const old_value = (*self)[index];
+ self->erase(self->begin() + index);
+ return old_value;
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+SWIGINTERN std::vector< unsigned char >::value_type const &std_vector_Sl_uint8_t_Sg__doGet(std::vector< uint8_t > *self,jint index){
+ jint size = static_cast(self->size());
+ if (index >= 0 && index < size)
+ return (*self)[index];
+ else
+ throw std::out_of_range("vector index out of range");
+ }
+SWIGINTERN std::vector< unsigned char >::value_type std_vector_Sl_uint8_t_Sg__doSet(std::vector< uint8_t > *self,jint index,std::vector< unsigned char >::value_type const &val){
+ jint size = static_cast(self->size());
+ if (index >= 0 && index < size) {
+ unsigned char const old_value = (*self)[index];
+ (*self)[index] = val;
+ return old_value;
+ }
+ else
+ throw std::out_of_range("vector index out of range");
+ }
+SWIGINTERN void std_vector_Sl_uint8_t_Sg__doRemoveRange(std::vector< uint8_t > *self,jint fromIndex,jint toIndex){
+ jint size = static_cast(self->size());
+ if (0 <= fromIndex && fromIndex <= toIndex && toIndex <= size) {
+ self->erase(self->begin() + fromIndex, self->begin() + toIndex);
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+SWIGINTERN std::vector< int8_t > *new_std_vector_Sl_int8_t_Sg___SWIG_2(jint count,signed char const &value){
+ if (count < 0)
+ throw std::out_of_range("vector count must be positive");
+ return new std::vector< signed char >(static_cast::size_type>(count), value);
+ }
+SWIGINTERN jint std_vector_Sl_int8_t_Sg__doCapacity(std::vector< int8_t > *self){
+ return SWIG_VectorSize(self->capacity());
+ }
+SWIGINTERN void std_vector_Sl_int8_t_Sg__doReserve(std::vector< int8_t > *self,jint n){
+ if (n < 0)
+ throw std::out_of_range("vector reserve size must be positive");
+ self->reserve(n);
+ }
+SWIGINTERN jint std_vector_Sl_int8_t_Sg__doSize(std::vector< int8_t > const *self){
+ return SWIG_VectorSize(self->size());
+ }
+SWIGINTERN void std_vector_Sl_int8_t_Sg__doAdd__SWIG_0(std::vector< int8_t > *self,std::vector< signed char >::value_type const &x){
+ self->push_back(x);
+ }
+SWIGINTERN void std_vector_Sl_int8_t_Sg__doAdd__SWIG_1(std::vector< int8_t > *self,jint index,std::vector< signed char >::value_type const &x){
+ jint size = static_cast(self->size());
+ if (0 <= index && index <= size) {
+ self->insert(self->begin() + index, x);
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+SWIGINTERN std::vector< signed char >::value_type std_vector_Sl_int8_t_Sg__doRemove(std::vector< int8_t > *self,jint index){
+ jint size = static_cast(self->size());
+ if (0 <= index && index < size) {
+ signed char const old_value = (*self)[index];
+ self->erase(self->begin() + index);
+ return old_value;
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+SWIGINTERN std::vector< signed char >::value_type const &std_vector_Sl_int8_t_Sg__doGet(std::vector< int8_t > *self,jint index){
+ jint size = static_cast(self->size());
+ if (index >= 0 && index < size)
+ return (*self)[index];
+ else
+ throw std::out_of_range("vector index out of range");
+ }
+SWIGINTERN std::vector< signed char >::value_type std_vector_Sl_int8_t_Sg__doSet(std::vector< int8_t > *self,jint index,std::vector< signed char >::value_type const &val){
+ jint size = static_cast(self->size());
+ if (index >= 0 && index < size) {
+ signed char const old_value = (*self)[index];
+ (*self)[index] = val;
+ return old_value;
+ }
+ else
+ throw std::out_of_range("vector index out of range");
+ }
+SWIGINTERN void std_vector_Sl_int8_t_Sg__doRemoveRange(std::vector< int8_t > *self,jint fromIndex,jint toIndex){
+ jint size = static_cast(self->size());
+ if (0 <= fromIndex && fromIndex <= toIndex && toIndex <= size) {
+ self->erase(self->begin() + fromIndex, self->begin() + toIndex);
+ } else {
+ throw std::out_of_range("vector index out of range");
+ }
+ }
+
+struct SWIG_null_deleter {
+ void operator() (void const *) const {
+ }
+};
+#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter()
+#define SWIG_NO_NULL_DELETER_1
+#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW
+#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN
+
+
+#include
+
+
+
+/* ---------------------------------------------------
+ * C++ director class methods
+ * --------------------------------------------------- */
+
+#include "wedpr_java_transportJAVA_wrap.h"
+
+SwigDirector_ErrorCallback::SwigDirector_ErrorCallback(JNIEnv *jenv) : ppc::front::ErrorCallback(), Swig::Director(jenv) {
+}
+
+SwigDirector_ErrorCallback::~SwigDirector_ErrorCallback() {
+ swig_disconnect_director_self("swigDirectorDisconnect");
+}
+
+
+void SwigDirector_ErrorCallback::onError(bcos::Error::Ptr error) {
+ JNIEnvWrapper swigjnienv(this) ;
+ JNIEnv * jenv = swigjnienv.getJNIEnv() ;
+ jobject swigjobj = (jobject) NULL ;
+ jlong jerror ;
+
+ if (!swig_override[0]) {
+ SWIG_JavaThrowException(JNIEnvWrapper(this).getJNIEnv(), SWIG_JavaDirectorPureVirtual, "Attempted to invoke pure virtual method ppc::front::ErrorCallback::onError.");
+ return;
+ }
+ swigjobj = swig_get_self(jenv);
+ if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
+ jerror = 0;
+ if (error) {
+ *((std::shared_ptr< bcos::Error > **)&jerror) = new std::shared_ptr< bcos::Error >(error);
+ }
+ jenv->CallStaticVoidMethod(Swig::jclass_wedpr_java_transportJNI, Swig::director_method_ids[0], swigjobj, jerror);
+ jthrowable swigerror = jenv->ExceptionOccurred();
+ if (swigerror) {
+ Swig::DirectorException::raise(jenv, swigerror);
+ }
+
+ } else {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object in ppc::front::ErrorCallback::onError ");
+ }
+ if (swigjobj) jenv->DeleteLocalRef(swigjobj);
+}
+
+void SwigDirector_ErrorCallback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
+ static jclass baseclass = swig_new_global_ref(jenv, "com/webank/wedpr/sdk/jni/generated/ErrorCallback");
+ if (!baseclass) return;
+ static SwigDirectorMethod methods[] = {
+ SwigDirectorMethod(jenv, baseclass, "onError", "(Lcom/webank/wedpr/sdk/jni/generated/Error;)V")
+ };
+
+ if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
+ bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
+ for (int i = 0; i < 1; ++i) {
+ swig_override[i] = false;
+ if (derived) {
+ jmethodID methid = jenv->GetMethodID(jcls, methods[i].name, methods[i].desc);
+ swig_override[i] = methods[i].methid && (methid != methods[i].methid);
+ jenv->ExceptionClear();
+ }
+ }
+ }
+}
+
+
+SwigDirector_MessageDispatcherHandler::SwigDirector_MessageDispatcherHandler(JNIEnv *jenv) : ppc::front::MessageDispatcherHandler(), Swig::Director(jenv) {
+}
+
+SwigDirector_MessageDispatcherHandler::~SwigDirector_MessageDispatcherHandler() {
+ swig_disconnect_director_self("swigDirectorDisconnect");
+}
+
+
+void SwigDirector_MessageDispatcherHandler::onMessage(ppc::protocol::Message::Ptr msg) {
+ JNIEnvWrapper swigjnienv(this) ;
+ JNIEnv * jenv = swigjnienv.getJNIEnv() ;
+ jobject swigjobj = (jobject) NULL ;
+ jlong jmsg ;
+
+ if (!swig_override[0]) {
+ SWIG_JavaThrowException(JNIEnvWrapper(this).getJNIEnv(), SWIG_JavaDirectorPureVirtual, "Attempted to invoke pure virtual method ppc::front::MessageDispatcherHandler::onMessage.");
+ return;
+ }
+ swigjobj = swig_get_self(jenv);
+ if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
+ jmsg = 0;
+ if (msg) {
+ *((std::shared_ptr< ppc::protocol::Message > **)&jmsg) = new std::shared_ptr< ppc::protocol::Message >(msg);
+ }
+ jenv->CallStaticVoidMethod(Swig::jclass_wedpr_java_transportJNI, Swig::director_method_ids[1], swigjobj, jmsg);
+ jthrowable swigerror = jenv->ExceptionOccurred();
+ if (swigerror) {
+ Swig::DirectorException::raise(jenv, swigerror);
+ }
+
+ } else {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object in ppc::front::MessageDispatcherHandler::onMessage ");
+ }
+ if (swigjobj) jenv->DeleteLocalRef(swigjobj);
+}
+
+void SwigDirector_MessageDispatcherHandler::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
+ static jclass baseclass = swig_new_global_ref(jenv, "com/webank/wedpr/sdk/jni/generated/MessageDispatcherHandler");
+ if (!baseclass) return;
+ static SwigDirectorMethod methods[] = {
+ SwigDirectorMethod(jenv, baseclass, "onMessage", "(Lcom/webank/wedpr/sdk/jni/generated/Message;)V")
+ };
+
+ if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
+ bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
+ for (int i = 0; i < 1; ++i) {
+ swig_override[i] = false;
+ if (derived) {
+ jmethodID methid = jenv->GetMethodID(jcls, methods[i].name, methods[i].desc);
+ swig_override[i] = methods[i].methid && (methid != methods[i].methid);
+ jenv->ExceptionClear();
+ }
+ }
+ }
+}
+
+
+SwigDirector_IMessageHandler::SwigDirector_IMessageHandler(JNIEnv *jenv) : ppc::front::IMessageHandler(), Swig::Director(jenv) {
+}
+
+SwigDirector_IMessageHandler::~SwigDirector_IMessageHandler() {
+ swig_disconnect_director_self("swigDirectorDisconnect");
+}
+
+
+void SwigDirector_IMessageHandler::onMessage(bcos::Error::Ptr e,ppc::protocol::Message::Ptr msg,ppc::front::SendResponseHandler sendResponseHandler) {
+ JNIEnvWrapper swigjnienv(this) ;
+ JNIEnv * jenv = swigjnienv.getJNIEnv() ;
+ jobject swigjobj = (jobject) NULL ;
+ jlong je ;
+ jlong jmsg ;
+ jlong jsendResponseHandler ;
+
+ if (!swig_override[0]) {
+ SWIG_JavaThrowException(JNIEnvWrapper(this).getJNIEnv(), SWIG_JavaDirectorPureVirtual, "Attempted to invoke pure virtual method ppc::front::IMessageHandler::onMessage.");
+ return;
+ }
+ swigjobj = swig_get_self(jenv);
+ if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
+ je = 0;
+ if (e) {
+ *((std::shared_ptr< bcos::Error > **)&je) = new std::shared_ptr< bcos::Error >(e);
+ }
+ jmsg = 0;
+ if (msg) {
+ *((std::shared_ptr< ppc::protocol::Message > **)&jmsg) = new std::shared_ptr< ppc::protocol::Message >(msg);
+ }
+ jsendResponseHandler = 0;
+ *((ppc::front::SendResponseHandler **)&jsendResponseHandler) = new ppc::front::SendResponseHandler(SWIG_STD_MOVE(sendResponseHandler));
+ jenv->CallStaticVoidMethod(Swig::jclass_wedpr_java_transportJNI, Swig::director_method_ids[2], swigjobj, je, jmsg, jsendResponseHandler);
+ jthrowable swigerror = jenv->ExceptionOccurred();
+ if (swigerror) {
+ Swig::DirectorException::raise(jenv, swigerror);
+ }
+
+ } else {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object in ppc::front::IMessageHandler::onMessage ");
+ }
+ if (swigjobj) jenv->DeleteLocalRef(swigjobj);
+}
+
+void SwigDirector_IMessageHandler::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
+ static jclass baseclass = swig_new_global_ref(jenv, "com/webank/wedpr/sdk/jni/generated/IMessageHandler");
+ if (!baseclass) return;
+ static SwigDirectorMethod methods[] = {
+ SwigDirectorMethod(jenv, baseclass, "onMessage", "(Lcom/webank/wedpr/sdk/jni/generated/Error;Lcom/webank/wedpr/sdk/jni/generated/Message;Lcom/webank/wedpr/sdk/jni/generated/SendResponseHandler;)V")
+ };
+
+ if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
+ bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
+ for (int i = 0; i < 1; ++i) {
+ swig_override[i] = false;
+ if (derived) {
+ jmethodID methid = jenv->GetMethodID(jcls, methods[i].name, methods[i].desc);
+ swig_override[i] = methods[i].methid && (methid != methods[i].methid);
+ jenv->ExceptionClear();
+ }
+ }
+ }
+}
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedBcosError(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< bcos::Error > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< bcos::Error > *)new std::shared_ptr< bcos::Error >();
+ *(std::shared_ptr< bcos::Error > **)&jresult = (result && *result) ? new std::shared_ptr< bcos::Error >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedBcosError(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< bcos::Error > *arg1 = (std::shared_ptr< bcos::Error > *) 0 ;
+ std::shared_ptr< bcos::Error > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< bcos::Error > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedFrontConfig(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::FrontConfig > *)new std::shared_ptr< ppc::front::FrontConfig >();
+ *(std::shared_ptr< ppc::front::FrontConfig > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::FrontConfig >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedFrontConfig(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::FrontConfig > *arg1 = (std::shared_ptr< ppc::front::FrontConfig > *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedGrpcConfig(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::GrpcConfig > *)new std::shared_ptr< ppc::protocol::GrpcConfig >();
+ *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::GrpcConfig >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedGrpcConfig(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::GrpcConfig > *arg1 = (std::shared_ptr< ppc::protocol::GrpcConfig > *) 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedFront(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::IFront > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::IFront > *)new std::shared_ptr< ppc::front::IFront >();
+ *(std::shared_ptr< ppc::front::IFront > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::IFront >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedFront(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::IFront > *arg1 = (std::shared_ptr< ppc::front::IFront > *) 0 ;
+ std::shared_ptr< ppc::front::IFront > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::IFront > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedFrontClient(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::IFrontClient > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::IFrontClient > *)new std::shared_ptr< ppc::front::IFrontClient >();
+ *(std::shared_ptr< ppc::front::IFrontClient > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::IFrontClient >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedFrontClient(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::IFrontClient > *arg1 = (std::shared_ptr< ppc::front::IFrontClient > *) 0 ;
+ std::shared_ptr< ppc::front::IFrontClient > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::IFrontClient > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedErrorCallback(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::ErrorCallback > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::ErrorCallback > *)new std::shared_ptr< ppc::front::ErrorCallback >();
+ *(std::shared_ptr< ppc::front::ErrorCallback > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::ErrorCallback >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedErrorCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::ErrorCallback > *arg1 = (std::shared_ptr< ppc::front::ErrorCallback > *) 0 ;
+ std::shared_ptr< ppc::front::ErrorCallback > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::ErrorCallback > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessageDispatcherHandler(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::MessageDispatcherHandler > *)new std::shared_ptr< ppc::front::MessageDispatcherHandler >();
+ *(std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::MessageDispatcherHandler >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessageDispatcherHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *arg1 = (std::shared_ptr< ppc::front::MessageDispatcherHandler > *) 0 ;
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedIMessageHandler(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::front::IMessageHandler > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::front::IMessageHandler > *)new std::shared_ptr< ppc::front::IMessageHandler >();
+ *(std::shared_ptr< ppc::front::IMessageHandler > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::front::IMessageHandler >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedIMessageHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::front::IMessageHandler > *arg1 = (std::shared_ptr< ppc::front::IMessageHandler > *) 0 ;
+ std::shared_ptr< ppc::front::IMessageHandler > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::front::IMessageHandler > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedGateway(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::gateway::IGateway > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::gateway::IGateway > *)new std::shared_ptr< ppc::gateway::IGateway >();
+ *(std::shared_ptr< ppc::gateway::IGateway > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::gateway::IGateway >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedGateway(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::gateway::IGateway > *arg1 = (std::shared_ptr< ppc::gateway::IGateway > *) 0 ;
+ std::shared_ptr< ppc::gateway::IGateway > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::gateway::IGateway > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessage(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::Message > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::Message > *)new std::shared_ptr< ppc::protocol::Message >();
+ *(std::shared_ptr< ppc::protocol::Message > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::Message >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::Message > *arg1 = (std::shared_ptr< ppc::protocol::Message > *) 0 ;
+ std::shared_ptr< ppc::protocol::Message > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::Message > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessageHeader(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessageHeader > *)new std::shared_ptr< ppc::protocol::MessageHeader >();
+ *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessageHeader >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessageHeader(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessageHeader > *arg1 = (std::shared_ptr< ppc::protocol::MessageHeader > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessagePayload(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessagePayload > *)new std::shared_ptr< ppc::protocol::MessagePayload >();
+ *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessagePayload >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessagePayload(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessagePayload > *arg1 = (std::shared_ptr< ppc::protocol::MessagePayload > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedRouteInfo(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessageOptionalHeader > *)new std::shared_ptr< ppc::protocol::MessageOptionalHeader >();
+ *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessageOptionalHeader >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedRouteInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *arg1 = (std::shared_ptr< ppc::protocol::MessageOptionalHeader > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessageBuilder(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessageBuilder > *)new std::shared_ptr< ppc::protocol::MessageBuilder >();
+ *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessageBuilder >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessageBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessageBuilder > *arg1 = (std::shared_ptr< ppc::protocol::MessageBuilder > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessageHeaderBuilder(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *)new std::shared_ptr< ppc::protocol::MessageHeaderBuilder >();
+ *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessageHeaderBuilder >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessageHeaderBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *arg1 = (std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedMessagePayloadBuilder(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *)new std::shared_ptr< ppc::protocol::MessagePayloadBuilder >();
+ *(std::shared_ptr< ppc::protocol::MessagePayloadBuilder > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessagePayloadBuilder >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedMessagePayloadBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *arg1 = (std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessagePayloadBuilder > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SharedRouteInfoBuilder(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *)new std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder >();
+ *(std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > **)&jresult = (result && *result) ? new std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder >(*result) : 0;
+ if (1) delete result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SharedRouteInfoBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *arg1 = (std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > tempnull1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1 ? *(std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > **)&jarg1 : &tempnull1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ubytes_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::vector< uint8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::vector< uint8_t > *)new std::vector< uint8_t >();
+ *(std::vector< uint8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ubytes_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ std::vector< uint8_t > *arg1 = 0 ;
+ std::vector< uint8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ if (!arg1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< uint8_t > const & is null");
+ return 0;
+ }
+ result = (std::vector< uint8_t > *)new std::vector< uint8_t >((std::vector< uint8_t > const &)*arg1);
+ *(std::vector< uint8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ result = (bool)((std::vector< uint8_t > const *)arg1)->empty();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ (arg1)->clear();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ubytes_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2) {
+ jlong jresult = 0 ;
+ jint arg1 ;
+ unsigned char *arg2 = 0 ;
+ unsigned char temp2 ;
+ std::vector< uint8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1;
+ temp2 = (unsigned char)jarg2;
+ arg2 = &temp2;
+ try {
+ result = (std::vector< uint8_t > *)new_std_vector_Sl_uint8_t_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(unsigned char const &)*arg2);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ *(std::vector< uint8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ try {
+ result = std_vector_Sl_uint8_t_Sg__doCapacity(arg1);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ std_vector_Sl_uint8_t_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::length_error &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ try {
+ result = std_vector_Sl_uint8_t_Sg__doSize((std::vector< unsigned char > const *)arg1);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doAdd_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ std::vector< unsigned char >::value_type *arg2 = 0 ;
+ std::vector< unsigned char >::value_type temp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ temp2 = (std::vector< unsigned char >::value_type)jarg2;
+ arg2 = &temp2;
+ std_vector_Sl_uint8_t_Sg__doAdd__SWIG_0(arg1,(unsigned char const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doAdd_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jshort jarg3) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< unsigned char >::value_type *arg3 = 0 ;
+ std::vector< unsigned char >::value_type temp3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ temp3 = (std::vector< unsigned char >::value_type)jarg3;
+ arg3 = &temp3;
+ try {
+ std_vector_Sl_uint8_t_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(unsigned char const &)*arg3);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doRemove(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ jshort jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< unsigned char >::value_type result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jshort)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doGet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ jshort jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< unsigned char >::value_type *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ result = (std::vector< unsigned char >::value_type *) &std_vector_Sl_uint8_t_Sg__doGet(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jshort)*result;
+ return jresult;
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jshort jarg3) {
+ jshort jresult = 0 ;
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< unsigned char >::value_type *arg3 = 0 ;
+ std::vector< unsigned char >::value_type temp3 ;
+ std::vector< unsigned char >::value_type result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ temp3 = (std::vector< unsigned char >::value_type)jarg3;
+ arg3 = &temp3;
+ try {
+ result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(unsigned char const &)*arg3);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jshort)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ubytes_1doRemoveRange(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+ jint arg2 ;
+ jint arg3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ arg2 = jarg2;
+ arg3 = jarg3;
+ try {
+ std_vector_Sl_uint8_t_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1ubytes(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(std::vector< uint8_t > **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ibytes_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ std::vector< int8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (std::vector< int8_t > *)new std::vector< int8_t >();
+ *(std::vector< int8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ibytes_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ std::vector< int8_t > *arg1 = 0 ;
+ std::vector< int8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ if (!arg1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< int8_t > const & is null");
+ return 0;
+ }
+ result = (std::vector< int8_t > *)new std::vector< int8_t >((std::vector< int8_t > const &)*arg1);
+ *(std::vector< int8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ result = (bool)((std::vector< int8_t > const *)arg1)->empty();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ (arg1)->clear();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ibytes_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1, jbyte jarg2) {
+ jlong jresult = 0 ;
+ jint arg1 ;
+ signed char *arg2 = 0 ;
+ signed char temp2 ;
+ std::vector< int8_t > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = jarg1;
+ temp2 = (signed char)jarg2;
+ arg2 = &temp2;
+ try {
+ result = (std::vector< int8_t > *)new_std_vector_Sl_int8_t_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(signed char const &)*arg2);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ *(std::vector< int8_t > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ try {
+ result = std_vector_Sl_int8_t_Sg__doCapacity(arg1);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ std_vector_Sl_int8_t_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::length_error &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ try {
+ result = std_vector_Sl_int8_t_Sg__doSize((std::vector< signed char > const *)arg1);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doAdd_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyte jarg2) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ std::vector< signed char >::value_type *arg2 = 0 ;
+ std::vector< signed char >::value_type temp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ temp2 = (std::vector< signed char >::value_type)jarg2;
+ arg2 = &temp2;
+ std_vector_Sl_int8_t_Sg__doAdd__SWIG_0(arg1,(signed char const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doAdd_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jbyte jarg3) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< signed char >::value_type *arg3 = 0 ;
+ std::vector< signed char >::value_type temp3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ temp3 = (std::vector< signed char >::value_type)jarg3;
+ arg3 = &temp3;
+ try {
+ std_vector_Sl_int8_t_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(signed char const &)*arg3);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT jbyte JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doRemove(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ jbyte jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< signed char >::value_type result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ result = (std::vector< signed char >::value_type)std_vector_Sl_int8_t_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jbyte)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jbyte JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doGet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ jbyte jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< signed char >::value_type *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ try {
+ result = (std::vector< signed char >::value_type *) &std_vector_Sl_int8_t_Sg__doGet(arg1,SWIG_STD_MOVE(arg2));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jbyte)*result;
+ return jresult;
+}
+
+
+SWIGEXPORT jbyte JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jbyte jarg3) {
+ jbyte jresult = 0 ;
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+ std::vector< signed char >::value_type *arg3 = 0 ;
+ std::vector< signed char >::value_type temp3 ;
+ std::vector< signed char >::value_type result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ temp3 = (std::vector< signed char >::value_type)jarg3;
+ arg3 = &temp3;
+ try {
+ result = (std::vector< signed char >::value_type)std_vector_Sl_int8_t_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(signed char const &)*arg3);
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return 0;
+ }
+ jresult = (jbyte)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ibytes_1doRemoveRange(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+ jint arg2 ;
+ jint arg3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ arg2 = jarg2;
+ arg3 = jarg3;
+ try {
+ std_vector_Sl_int8_t_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3));
+ } catch(std::out_of_range &_e) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what());
+ return ;
+ }
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1ibytes(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ std::vector< int8_t > *arg1 = (std::vector< int8_t > *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(std::vector< int8_t > **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1buildError_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jbyteArray jarg1, jbyteArray jarg2, jint jarg3, jint jarg4, jstring jarg5) {
+ jlong jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int32_t arg4 ;
+ std::string *arg5 = 0 ;
+ bcos::Error result;
+
+ (void)jenv;
+ (void)jcls;
+ {
+ arg1 = (char *) jenv->GetByteArrayElements(jarg1, 0);
+ }
+ {
+ arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0);
+ }
+ arg3 = (int)jarg3;
+ arg4 = (int32_t)jarg4;
+ if(!jarg5) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
+ if (!arg5_pstr) return 0;
+ std::string arg5_str(arg5_pstr);
+ arg5 = &arg5_str;
+ jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
+ result = bcos::Error::buildError((char const *)arg1,(char const *)arg2,arg3,arg4,(std::string const &)*arg5);
+ *(std::shared_ptr< bcos::Error > **)&jresult = new std::shared_ptr< bcos::Error >(new bcos::Error(result));
+ {
+ jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1, 0);
+ }
+ {
+ jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0);
+ }
+
+
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1buildError_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jbyteArray jarg1, jbyteArray jarg2, jint jarg3, jint jarg4, jstring jarg5, jlong jarg6, jobject jarg6_) {
+ jlong jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int32_t arg4 ;
+ std::string *arg5 = 0 ;
+ bcos::Error *arg6 = 0 ;
+ bcos::Error result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg6_;
+ {
+ arg1 = (char *) jenv->GetByteArrayElements(jarg1, 0);
+ }
+ {
+ arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0);
+ }
+ arg3 = (int)jarg3;
+ arg4 = (int32_t)jarg4;
+ if(!jarg5) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
+ if (!arg5_pstr) return 0;
+ std::string arg5_str(arg5_pstr);
+ arg5 = &arg5_str;
+ jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
+
+ arg6 = (bcos::Error *)((*(std::shared_ptr< const bcos::Error > **)&jarg6) ? (*(std::shared_ptr< const bcos::Error > **)&jarg6)->get() : 0);
+ if (!arg6) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::Error const & reference is null");
+ return 0;
+ }
+ result = bcos::Error::buildError((char const *)arg1,(char const *)arg2,arg3,arg4,(std::string const &)*arg5,(bcos::Error const &)*arg6);
+ *(std::shared_ptr< bcos::Error > **)&jresult = new std::shared_ptr< bcos::Error >(new bcos::Error(result));
+ {
+ jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1, 0);
+ }
+ {
+ jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0);
+ }
+
+
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1buildError_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jbyteArray jarg1, jbyteArray jarg2, jint jarg3, jint jarg4, jstring jarg5, jlong jarg6) {
+ jlong jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int32_t arg4 ;
+ std::string *arg5 = 0 ;
+ std::exception *arg6 = 0 ;
+ bcos::Error result;
+
+ (void)jenv;
+ (void)jcls;
+ {
+ arg1 = (char *) jenv->GetByteArrayElements(jarg1, 0);
+ }
+ {
+ arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0);
+ }
+ arg3 = (int)jarg3;
+ arg4 = (int32_t)jarg4;
+ if(!jarg5) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
+ if (!arg5_pstr) return 0;
+ std::string arg5_str(arg5_pstr);
+ arg5 = &arg5_str;
+ jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
+ arg6 = *(std::exception **)&jarg6;
+ if (!arg6) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::exception const & is null");
+ return 0;
+ }
+ result = bcos::Error::buildError((char const *)arg1,(char const *)arg2,arg3,arg4,(std::string const &)*arg5,(std::exception const &)*arg6);
+ *(std::shared_ptr< bcos::Error > **)&jresult = new std::shared_ptr< bcos::Error >(new bcos::Error(result));
+ {
+ jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1, 0);
+ }
+ {
+ jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0);
+ }
+
+
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1Error_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ bcos::Error *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (bcos::Error *)new bcos::Error();
+
+ *(std::shared_ptr< bcos::Error > **)&jresult = result ? new std::shared_ptr< bcos::Error >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1Error_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
+ jlong jresult = 0 ;
+ int64_t arg1 ;
+ std::string arg2 ;
+ bcos::Error *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = (int64_t)jarg1;
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ result = (bcos::Error *)new bcos::Error(arg1,arg2);
+
+ *(std::shared_ptr< bcos::Error > **)&jresult = result ? new std::shared_ptr< bcos::Error >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1Error(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ bcos::Error *arg1 = (bcos::Error *) 0 ;
+ std::shared_ptr< bcos::Error > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< bcos::Error > **)&jarg1;
+ arg1 = (bcos::Error *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1errorCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ bcos::Error *arg1 = (bcos::Error *) 0 ;
+ std::shared_ptr< bcos::Error const > *smartarg1 = 0 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const bcos::Error > **)&jarg1;
+ arg1 = (bcos::Error *)(smartarg1 ? smartarg1->get() : 0);
+ result = (int64_t)((bcos::Error const *)arg1)->errorCode();
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1errorMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ bcos::Error *arg1 = (bcos::Error *) 0 ;
+ std::shared_ptr< bcos::Error const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const bcos::Error > **)&jarg1;
+ arg1 = (bcos::Error *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((bcos::Error const *)arg1)->errorMessage();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1setErrorCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ bcos::Error *arg1 = (bcos::Error *) 0 ;
+ int64_t arg2 ;
+ std::shared_ptr< bcos::Error > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< bcos::Error > **)&jarg1;
+ arg1 = (bcos::Error *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (int64_t)jarg2;
+ (arg1)->setErrorCode(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Error_1setErrorMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ bcos::Error *arg1 = (bcos::Error *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< bcos::Error > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< bcos::Error > **)&jarg1;
+ arg1 = (bcos::Error *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setErrorMessage((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_InputBuffer_1data_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ InputBuffer *arg1 = (InputBuffer *) 0 ;
+ unsigned char *arg2 = (unsigned char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(InputBuffer **)&jarg1;
+ arg2 = *(unsigned char **)&jarg2;
+ if (arg1) (arg1)->data = (unsigned char const *)arg2;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_InputBuffer_1data_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ InputBuffer *arg1 = (InputBuffer *) 0 ;
+ unsigned char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(InputBuffer **)&jarg1;
+ result = (unsigned char *) ((arg1)->data);
+ *(unsigned char **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_InputBuffer_1len_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
+ InputBuffer *arg1 = (InputBuffer *) 0 ;
+ uint64_t arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(InputBuffer **)&jarg1;
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return ;
+ }
+ clazz = jenv->GetObjectClass(jarg2);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg2, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg2 = 0;
+ if (sz > 0) {
+ arg2 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ if (arg1) (arg1)->len = arg2;
+}
+
+
+SWIGEXPORT jobject JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_InputBuffer_1len_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jobject jresult = 0 ;
+ InputBuffer *arg1 = (InputBuffer *) 0 ;
+ uint64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(InputBuffer **)&jarg1;
+ result = (uint64_t) ((arg1)->len);
+ {
+ jbyteArray ba = jenv->NewByteArray(9);
+ jbyte* bae = jenv->GetByteArrayElements(ba, 0);
+ jclass clazz = jenv->FindClass("java/math/BigInteger");
+ jmethodID mid = jenv->GetMethodID(clazz, "", "([B)V");
+ jobject bigint;
+ int i;
+
+ bae[0] = 0;
+ for(i=1; i<9; i++ ) {
+ bae[i] = (jbyte)(result>>8*(8-i));
+ }
+
+ jenv->ReleaseByteArrayElements(ba, bae, 0);
+ bigint = jenv->NewObject(clazz, mid, ba);
+ jenv->DeleteLocalRef(ba);
+ jresult = bigint;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1InputBuffer(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ InputBuffer *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (InputBuffer *)new InputBuffer();
+ *(InputBuffer **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1InputBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ InputBuffer *arg1 = (InputBuffer *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(InputBuffer **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_OutputBuffer_1data_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ OutputBuffer *arg1 = (OutputBuffer *) 0 ;
+ unsigned char *arg2 = (unsigned char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(OutputBuffer **)&jarg1;
+ arg2 = *(unsigned char **)&jarg2;
+ if (arg1) (arg1)->data = arg2;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_OutputBuffer_1data_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ OutputBuffer *arg1 = (OutputBuffer *) 0 ;
+ unsigned char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(OutputBuffer **)&jarg1;
+ result = (unsigned char *) ((arg1)->data);
+ *(unsigned char **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_OutputBuffer_1len_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
+ OutputBuffer *arg1 = (OutputBuffer *) 0 ;
+ uint64_t arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(OutputBuffer **)&jarg1;
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return ;
+ }
+ clazz = jenv->GetObjectClass(jarg2);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg2, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg2 = 0;
+ if (sz > 0) {
+ arg2 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ if (arg1) (arg1)->len = arg2;
+}
+
+
+SWIGEXPORT jobject JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_OutputBuffer_1len_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jobject jresult = 0 ;
+ OutputBuffer *arg1 = (OutputBuffer *) 0 ;
+ uint64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(OutputBuffer **)&jarg1;
+ result = (uint64_t) ((arg1)->len);
+ {
+ jbyteArray ba = jenv->NewByteArray(9);
+ jbyte* bae = jenv->GetByteArrayElements(ba, 0);
+ jclass clazz = jenv->FindClass("java/math/BigInteger");
+ jmethodID mid = jenv->GetMethodID(clazz, "", "([B)V");
+ jobject bigint;
+ int i;
+
+ bae[0] = 0;
+ for(i=1; i<9; i++ ) {
+ bae[i] = (jbyte)(result>>8*(8-i));
+ }
+
+ jenv->ReleaseByteArrayElements(ba, bae, 0);
+ bigint = jenv->NewObject(clazz, mid, ba);
+ jenv->DeleteLocalRef(ba);
+ jresult = bigint;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1OutputBuffer(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ OutputBuffer *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (OutputBuffer *)new OutputBuffer();
+ *(OutputBuffer **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1OutputBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ OutputBuffer *arg1 = (OutputBuffer *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(OutputBuffer **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1FrontConfig(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1threadPoolSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (int)((ppc::front::FrontConfig const *)arg1)->threadPoolSize();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setThreadPoolSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ int arg2 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (int)jarg2;
+ (arg1)->setThreadPoolSize(arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1nodeID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::front::FrontConfig const *)arg1)->nodeID();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setNodeID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setNodeID((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1selfEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::EndPoint *) &((ppc::front::FrontConfig const *)arg1)->selfEndPoint();
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1mutableSelfEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::EndPoint *) &(arg1)->mutableSelfEndPoint();
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setSelfEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ ppc::protocol::EndPoint *arg2 = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(ppc::protocol::EndPoint **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "ppc::protocol::EndPoint const & is null");
+ return ;
+ }
+ (arg1)->setSelfEndPoint((ppc::protocol::EndPoint const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setGatewayGrpcTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setGatewayGrpcTarget((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1gatewayGrpcTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::front::FrontConfig const *)arg1)->gatewayGrpcTarget();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setGrpcConfig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ ppc::protocol::GrpcConfig::Ptr arg2 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+ ppc::protocol::GrpcConfig::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::GrpcConfig::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->setGrpcConfig(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1grpcConfig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ ppc::protocol::GrpcConfig::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::GrpcConfig::Ptr *) &((ppc::front::FrontConfig const *)arg1)->grpcConfig();
+ *(ppc::protocol::GrpcConfig::Ptr **)&jresult = *result ? new ppc::protocol::GrpcConfig::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1generateNodeInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ ppc::protocol::INodeInfo::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::front::FrontConfig const *)arg1)->generateNodeInfo();
+ *(ppc::protocol::INodeInfo::Ptr **)&jresult = new ppc::protocol::INodeInfo::Ptr(result);
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1getComponents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig const > *smartarg1 = 0 ;
+ std::vector< std::string > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::vector< std::string > *) &((ppc::front::FrontConfig const *)arg1)->getComponents();
+ *(std::vector< std::string > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1setComponents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::vector< std::string > *arg2 = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(std::vector< std::string > **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::string > const & is null");
+ return ;
+ }
+ (arg1)->setComponents((std::vector< std::string > const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1addComponent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->addComponent((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfig_1mutableComponents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig *arg1 = (ppc::front::FrontConfig *) 0 ;
+ std::shared_ptr< ppc::front::FrontConfig > *smartarg1 = 0 ;
+ std::vector< std::string > *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::FrontConfig > **)&jarg1;
+ arg1 = (ppc::front::FrontConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::vector< std::string > *) &(arg1)->mutableComponents();
+ *(std::vector< std::string > **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1FrontConfigBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::FrontConfigBuilder *arg1 = (ppc::front::FrontConfigBuilder *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::front::FrontConfigBuilder **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfigBuilder_1build_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfigBuilder *arg1 = (ppc::front::FrontConfigBuilder *) 0 ;
+ ppc::front::FrontConfig::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::front::FrontConfigBuilder **)&jarg1;
+ result = ((ppc::front::FrontConfigBuilder const *)arg1)->build();
+ *(ppc::front::FrontConfig::Ptr **)&jresult = result ? new ppc::front::FrontConfig::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontConfigBuilder_1build_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfigBuilder *arg1 = (ppc::front::FrontConfigBuilder *) 0 ;
+ int arg2 ;
+ std::string arg3 ;
+ ppc::front::FrontConfig::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::front::FrontConfigBuilder **)&jarg1;
+ arg2 = (int)jarg2;
+ if(!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3_pstr) return 0;
+ (&arg3)->assign(arg3_pstr);
+ jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
+ result = ((ppc::front::FrontConfigBuilder const *)arg1)->build(arg2,arg3);
+ *(ppc::front::FrontConfig::Ptr **)&jresult = result ? new ppc::front::FrontConfig::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_printFrontDesc(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::front::FrontConfig::Ptr *arg1 = 0 ;
+ ppc::front::FrontConfig::Ptr tempnull1 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = jarg1 ? *(ppc::front::FrontConfig::Ptr **)&jarg1 : &tempnull1;
+ result = ppc::front::printFrontDesc((std::shared_ptr< ppc::front::FrontConfig > const &)*arg1);
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1EndPoint_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::protocol::EndPoint *)new ppc::protocol::EndPoint();
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1EndPoint_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
+ jlong jresult = 0 ;
+ std::string *arg1 = 0 ;
+ uint16_t arg2 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ if(!jarg1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1_pstr) return 0;
+ std::string arg1_str(arg1_pstr);
+ arg1 = &arg1_str;
+ jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
+ arg2 = (uint16_t)jarg2;
+ result = (ppc::protocol::EndPoint *)new ppc::protocol::EndPoint((std::string const &)*arg1,arg2);
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1EndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1host(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ result = (std::string *) &((ppc::protocol::EndPoint const *)arg1)->host();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1port(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ result = (uint16_t)((ppc::protocol::EndPoint const *)arg1)->port();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1setHost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setHost(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1setPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ uint16_t arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setPort(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1setListenIp(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string *arg2 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setListenIp((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1entryPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ result = ((ppc::protocol::EndPoint const *)arg1)->entryPoint();
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1listenEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ result = ((ppc::protocol::EndPoint const *)arg1)->listenEndPoint();
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_EndPoint_1listenIp(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::EndPoint *arg1 = (ppc::protocol::EndPoint *) 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::EndPoint **)&jarg1;
+ result = (std::string *) &((ppc::protocol::EndPoint const *)arg1)->listenIp();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1GrpcServerConfig_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::protocol::GrpcServerConfig *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::protocol::GrpcServerConfig *)new ppc::protocol::GrpcServerConfig();
+ *(ppc::protocol::GrpcServerConfig **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1GrpcServerConfig_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::EndPoint arg1 ;
+ bool arg2 ;
+ ppc::protocol::EndPoint *argp1 ;
+ ppc::protocol::GrpcServerConfig *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ argp1 = *(ppc::protocol::EndPoint **)&jarg1;
+ if (!argp1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::EndPoint");
+ return 0;
+ }
+ arg1 = *argp1;
+ arg2 = jarg2 ? true : false;
+ result = (ppc::protocol::GrpcServerConfig *)new ppc::protocol::GrpcServerConfig(arg1,arg2);
+ *(ppc::protocol::GrpcServerConfig **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1listenEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ result = ((ppc::protocol::GrpcServerConfig const *)arg1)->listenEndPoint();
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1setEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ ppc::protocol::EndPoint arg2 ;
+ ppc::protocol::EndPoint *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ argp2 = *(ppc::protocol::EndPoint **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::EndPoint");
+ return ;
+ }
+ arg2 = *argp2;
+ (arg1)->setEndPoint(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1setEnableHealthCheck(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ bool arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ arg2 = jarg2 ? true : false;
+ (arg1)->setEnableHealthCheck(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1endPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ result = (ppc::protocol::EndPoint *) &((ppc::protocol::GrpcServerConfig const *)arg1)->endPoint();
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1mutableEndPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ ppc::protocol::EndPoint *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ result = (ppc::protocol::EndPoint *) &(arg1)->mutableEndPoint();
+ *(ppc::protocol::EndPoint **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcServerConfig_1enableHealthCheck(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ result = (bool)((ppc::protocol::GrpcServerConfig const *)arg1)->enableHealthCheck();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1GrpcServerConfig(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::GrpcServerConfig *arg1 = (ppc::protocol::GrpcServerConfig *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::protocol::GrpcServerConfig **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1GrpcConfig(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::protocol::GrpcConfig *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::protocol::GrpcConfig *)new ppc::protocol::GrpcConfig();
+
+ *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jresult = result ? new std::shared_ptr< ppc::protocol::GrpcConfig >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1GrpcConfig(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1loadBalancePolicy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::GrpcConfig const *)arg1)->loadBalancePolicy();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1setLoadBalancePolicy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setLoadBalancePolicy((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1enableHealthCheck(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig const > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)((ppc::protocol::GrpcConfig const *)arg1)->enableHealthCheck();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1setEnableHealthCheck(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ bool arg2 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = jarg2 ? true : false;
+ (arg1)->setEnableHealthCheck(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1setEnableDnslookup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ bool arg2 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = jarg2 ? true : false;
+ (arg1)->setEnableDnslookup(arg2);
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_GrpcConfig_1enableDnslookup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::GrpcConfig *arg1 = (ppc::protocol::GrpcConfig *) 0 ;
+ std::shared_ptr< ppc::protocol::GrpcConfig const > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::GrpcConfig > **)&jarg1;
+ arg1 = (ppc::protocol::GrpcConfig *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)((ppc::protocol::GrpcConfig const *)arg1)->enableDnslookup();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageOptionalHeader(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1encode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes & reference is null");
+ return ;
+ }
+ ((ppc::protocol::MessageOptionalHeader const *)arg1)->encode(*arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1decode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg3) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ uint64_t arg3 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return 0;
+ }
+ clazz = jenv->GetObjectClass(jarg3);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg3, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg3 = 0;
+ if (sz > 0) {
+ arg3 = (uint64_t const)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ result = (int64_t)(arg1)->decode(arg2,arg3);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1componentType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageOptionalHeader const *)arg1)->componentType();
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setComponentType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::string arg2 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setComponentType(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1srcNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ bcos::bytes *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bcos::bytes *) &((ppc::protocol::MessageOptionalHeader const *)arg1)->srcNode();
+ *(std::shared_ptr< const bcos::bytes > **)&jresult = new std::shared_ptr< const bcos::bytes >(result SWIG_NO_NULL_DELETER_0);
+ return jresult;
+}
+
+
+SWIGEXPORT jbyteArray JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1srcNodeBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jbyteArray jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ OutputBuffer result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageOptionalHeader const *)arg1)->srcNodeBuffer();
+ {
+ jresult = jenv->NewByteArray((&result)->len);
+ jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte *) (&result)->data);
+ delete[] (&result)->data;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setSrcNode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< const bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< const bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes const & reference is null");
+ return ;
+ }
+ (arg1)->setSrcNode((bcos::bytes const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setSrcNode_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jobject jarg3) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ char *arg2 = (char *) 0 ;
+ uint64_t arg3 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ {
+ arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0);
+ }
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return ;
+ }
+ clazz = jenv->GetObjectClass(jarg3);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg3, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg3 = 0;
+ if (sz > 0) {
+ arg3 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ (arg1)->setSrcNode(arg2,arg3);
+ {
+ jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0);
+ }
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1dstNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ bcos::bytes *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bcos::bytes *) &((ppc::protocol::MessageOptionalHeader const *)arg1)->dstNode();
+ *(std::shared_ptr< const bcos::bytes > **)&jresult = new std::shared_ptr< const bcos::bytes >(result SWIG_NO_NULL_DELETER_0);
+ return jresult;
+}
+
+
+SWIGEXPORT jbyteArray JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1dstNodeBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jbyteArray jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ OutputBuffer result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageOptionalHeader const *)arg1)->dstNodeBuffer();
+ {
+ jresult = jenv->NewByteArray((&result)->len);
+ jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte *) (&result)->data);
+ delete[] (&result)->data;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setDstNode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< const bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< const bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes const & reference is null");
+ return ;
+ }
+ (arg1)->setDstNode((bcos::bytes const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setDstNode_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jobject jarg3) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ char *arg2 = (char *) 0 ;
+ uint64_t arg3 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ {
+ arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0);
+ }
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return ;
+ }
+ clazz = jenv->GetObjectClass(jarg3);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg3, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg3 = 0;
+ if (sz > 0) {
+ arg3 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ (arg1)->setDstNode(arg2,arg3);
+ {
+ jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0);
+ }
+
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1dstInst(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessageOptionalHeader const *)arg1)->dstInst();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setDstInst(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setDstInst((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1topic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessageOptionalHeader const *)arg1)->topic();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setTopic_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+ std::unique_ptr< std::string > rvrdeleter2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(std::string **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::string && is null");
+ return ;
+ }
+ rvrdeleter2.reset(arg2);
+ (arg1)->setTopic((std::string &&)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setTopic_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setTopic((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1srcInst(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader const > *smartarg1 = 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageOptionalHeader const *)arg1)->srcInst();
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeader_1setSrcInst(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageOptionalHeader *arg1 = (ppc::protocol::MessageOptionalHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setSrcInst((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageHeader(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1encode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes & reference is null");
+ return ;
+ }
+ ((ppc::protocol::MessageHeader const *)arg1)->encode(*arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1decode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (int64_t)(arg1)->decode(arg2);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1version(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jshort jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ uint8_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint8_t)((ppc::protocol::MessageHeader const *)arg1)->version();
+ jresult = (jshort)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setVersion(arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1traceID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessageHeader const *)arg1)->traceID();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setTraceID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::string arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setTraceID(arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1srcGwNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessageHeader const *)arg1)->srcGwNode();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setSrcGwNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setSrcGwNode((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1dstGwNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessageHeader const *)arg1)->dstGwNode();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setDstGwNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setDstGwNode((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1packetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessageHeader const *)arg1)->packetType();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setPacketType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setPacketType(arg2);
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1ttl(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jshort jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ int16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (int16_t)((ppc::protocol::MessageHeader const *)arg1)->ttl();
+ jresult = (jshort)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setTTL(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setTTL(arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1ext(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessageHeader const *)arg1)->ext();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setExt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setExt(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1optionalField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageHeader const *)arg1)->optionalField();
+ *(ppc::protocol::MessageOptionalHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageOptionalHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setOptionalField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->setOptionalField(arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1length(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessageHeader const *)arg1)->length();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1isRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)((ppc::protocol::MessageHeader const *)arg1)->isRespPacket();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->setRespPacket();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1srcP2PNodeIDView(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ std::string_view result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageHeader const *)arg1)->srcP2PNodeIDView();
+ *(std::string_view **)&jresult = new std::string_view(result);
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1dstP2PNodeIDView(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ std::string_view result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessageHeader const *)arg1)->dstP2PNodeIDView();
+ *(std::string_view **)&jresult = new std::string_view(result);
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1routeType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessageHeader const *)arg1)->routeType();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1setRouteType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ ppc::protocol::RouteType arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeader > *smartarg1 = 0 ;
+ ppc::protocol::RouteType *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::RouteType **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::RouteType");
+ return ;
+ }
+ arg2 = *argp2;
+ (arg1)->setRouteType(arg2);
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeader_1hasOptionalField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::MessageHeader *arg1 = (ppc::protocol::MessageHeader *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeader const > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessageHeader > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeader *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)((ppc::protocol::MessageHeader const *)arg1)->hasOptionalField();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1Message(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1header(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ ppc::protocol::MessageHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::Message const *)arg1)->header();
+ *(ppc::protocol::MessageHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ ppc::protocol::MessageHeader::Ptr arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ ppc::protocol::MessageHeader::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::MessageHeader::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->setHeader(arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1version(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::Message const *)arg1)->version();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setVersion(arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1packetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::Message const *)arg1)->packetType();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setPacketType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setPacketType(arg2);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1seq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::Message const *)arg1)->seq();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setSeq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::string arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setSeq(arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1ext(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::Message const *)arg1)->ext();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setExt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setExt(arg2);
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1isRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)((ppc::protocol::Message const *)arg1)->isRespPacket();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->setRespPacket();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1length(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ uint32_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint32_t)((ppc::protocol::Message const *)arg1)->length();
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1payload(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ std::shared_ptr< bcos::bytes > result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::Message const *)arg1)->payload();
+ *(std::shared_ptr< bcos::bytes > **)&jresult = result ? new std::shared_ptr< bcos::bytes >(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jbyteArray JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1payloadBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jbyteArray jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ OutputBuffer result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::Message const *)arg1)->payloadBuffer();
+ {
+ jresult = jenv->NewByteArray((&result)->len);
+ jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte *) (&result)->data);
+ delete[] (&result)->data;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setPayload(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< bcos::bytes > arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ std::shared_ptr< bcos::bytes > *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(std::shared_ptr< bcos::bytes > **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->setPayload(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1setFrontMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ ppc::protocol::MessagePayload::Ptr arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ ppc::protocol::MessagePayload::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::MessagePayload::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->setFrontMessage(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1frontMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ std::shared_ptr< ppc::protocol::Message const > *smartarg1 = 0 ;
+ ppc::protocol::MessagePayload::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::MessagePayload::Ptr *) &((ppc::protocol::Message const *)arg1)->frontMessage();
+ *(ppc::protocol::MessagePayload::Ptr **)&jresult = *result ? new ppc::protocol::MessagePayload::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1encode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes & reference is null");
+ return 0;
+ }
+ result = (bool)(arg1)->encode(*arg2);
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1encode_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jboolean jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ bcos::boostssl::EncodedMsg *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(bcos::boostssl::EncodedMsg **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::boostssl::EncodedMsg & is null");
+ return 0;
+ }
+ result = (bool)(arg1)->encode(*arg2);
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Message_1decode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::Message *arg1 = (ppc::protocol::Message *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::Message > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::Message > **)&jarg1;
+ arg1 = (ppc::protocol::Message *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (int64_t)(arg1)->decode(arg2);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageHeaderBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessageHeaderBuilder *arg1 = (ppc::protocol::MessageHeaderBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeaderBuilder_1build_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeaderBuilder *arg1 = (ppc::protocol::MessageHeaderBuilder *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ ppc::protocol::MessageHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (arg1)->build(arg2);
+ *(ppc::protocol::MessageHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeaderBuilder_1build_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeaderBuilder *arg1 = (ppc::protocol::MessageHeaderBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *smartarg1 = 0 ;
+ ppc::protocol::MessageHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ result = (arg1)->build();
+ *(ppc::protocol::MessageHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageHeaderBuilder_1build_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageHeaderBuilder *arg1 = (ppc::protocol::MessageHeaderBuilder *) 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageHeaderBuilder > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = jarg2 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg2 : &tempnull2;
+ result = (arg1)->build((ppc::protocol::MessageOptionalHeader::Ptr const &)*arg2);
+ *(ppc::protocol::MessageOptionalHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageOptionalHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessageBuilder *arg1 = (ppc::protocol::MessageBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageBuilder_1build_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageBuilder *arg1 = (ppc::protocol::MessageBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > *smartarg1 = 0 ;
+ ppc::protocol::Message::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ result = (arg1)->build();
+ *(ppc::protocol::Message::Ptr **)&jresult = result ? new ppc::protocol::Message::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageBuilder_1build_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageBuilder *arg1 = (ppc::protocol::MessageBuilder *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ ppc::protocol::Message::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (arg1)->build(arg2);
+ *(ppc::protocol::Message::Ptr **)&jresult = result ? new ppc::protocol::Message::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageBuilder_1build_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageBuilder *arg1 = (ppc::protocol::MessageBuilder *) 0 ;
+ ppc::protocol::RouteType arg2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg3 = 0 ;
+ bcos::bytes *arg4 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageBuilder > *smartarg1 = 0 ;
+ ppc::protocol::RouteType *argp2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull3 ;
+ std::unique_ptr< bcos::bytes > rvrdeleter4 ;
+ ppc::protocol::Message::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+ (void)jarg4_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::RouteType **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::RouteType");
+ return 0;
+ }
+ arg2 = *argp2;
+ arg3 = jarg3 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg3 : &tempnull3;
+ arg4 = *(bcos::bytes **)&jarg4;
+ if (!arg4) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes && is null");
+ return 0;
+ }
+ rvrdeleter4.reset(arg4);
+ result = (arg1)->build(arg2,(ppc::protocol::MessageOptionalHeader::Ptr const &)*arg3,(bcos::bytes &&)*arg4);
+ *(ppc::protocol::Message::Ptr **)&jresult = result ? new ppc::protocol::Message::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageOptionalHeaderBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessageOptionalHeaderBuilder *arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeaderBuilder_1build_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageOptionalHeaderBuilder *arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *) 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = jarg2 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg2 : &tempnull2;
+ result = (arg1)->build((ppc::protocol::MessageOptionalHeader::Ptr const &)*arg2);
+ *(ppc::protocol::MessageOptionalHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageOptionalHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageOptionalHeaderBuilder_1build_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessageOptionalHeaderBuilder *arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessageOptionalHeaderBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessageOptionalHeaderBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ result = (arg1)->build();
+ *(ppc::protocol::MessageOptionalHeader::Ptr **)&jresult = result ? new ppc::protocol::MessageOptionalHeader::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_printOptionalField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr arg1 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *argp1 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ argp1 = *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg1;
+ if (argp1) arg1 = *argp1;
+ result = ppc::protocol::printOptionalField(SWIG_STD_MOVE(arg1));
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_printMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::Message::Ptr *arg1 = 0 ;
+ ppc::protocol::Message::Ptr tempnull1 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = jarg1 ? *(ppc::protocol::Message::Ptr **)&jarg1 : &tempnull1;
+ result = ppc::protocol::printMessage((std::shared_ptr< ppc::protocol::Message > const &)*arg1);
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_printWsMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ jstring jresult = 0 ;
+ bcos::boostssl::MessageFace::Ptr *arg1 = 0 ;
+ std::string result;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(bcos::boostssl::MessageFace::Ptr **)&jarg1;
+ if (!arg1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::boostssl::MessageFace::Ptr const & is null");
+ return 0;
+ }
+ result = ppc::protocol::printWsMessage((bcos::boostssl::MessageFace::Ptr const &)*arg1);
+ jresult = jenv->NewStringUTF((&result)->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_FrontMsgExtFlag_1Response_1get(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ ppc::protocol::FrontMsgExtFlag result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::protocol::FrontMsgExtFlag)ppc::protocol::FrontMsgExtFlag::Response;
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessagePayload(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1encode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes & reference is null");
+ return 0;
+ }
+ result = (int64_t)((ppc::protocol::MessagePayload const *)arg1)->encode(*arg2);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1decode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (int64_t)(arg1)->decode(arg2);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jshort JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1version(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jshort jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ uint8_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint8_t)((ppc::protocol::MessagePayload const *)arg1)->version();
+ jresult = (jshort)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ uint8_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint8_t)jarg2;
+ (arg1)->setVersion(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1data(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ bcos::bytes *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bcos::bytes *) &((ppc::protocol::MessagePayload const *)arg1)->data();
+ *(std::shared_ptr< const bcos::bytes > **)&jresult = new std::shared_ptr< const bcos::bytes >(result SWIG_NO_NULL_DELETER_0);
+ return jresult;
+}
+
+
+SWIGEXPORT jbyteArray JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1dataBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jbyteArray jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ OutputBuffer result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = ((ppc::protocol::MessagePayload const *)arg1)->dataBuffer();
+ {
+ jresult = jenv->NewByteArray((&result)->len);
+ jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte *) (&result)->data);
+ delete[] (&result)->data;
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setData_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+ std::unique_ptr< bcos::bytes > rvrdeleter2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(bcos::bytes **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes && is null");
+ return ;
+ }
+ rvrdeleter2.reset(arg2);
+ (arg1)->setData((bcos::bytes &&)*arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1seq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessagePayload const *)arg1)->seq();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setSeq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setSeq(arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1length(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ int64_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (int64_t)((ppc::protocol::MessagePayload const *)arg1)->length();
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1traceID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ std::string *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (std::string *) &((ppc::protocol::MessagePayload const *)arg1)->traceID();
+ jresult = jenv->NewStringUTF(result->c_str());
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setTraceID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ (arg1)->setTraceID((std::string const &)*arg2);
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1ext(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload const > *smartarg1 = 0 ;
+ uint16_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (uint16_t)((ppc::protocol::MessagePayload const *)arg1)->ext();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setExt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ uint16_t arg2 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ (arg1)->setExt(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1setRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->setRespPacket();
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayload_1isRespPacket(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ ppc::protocol::MessagePayload *arg1 = (ppc::protocol::MessagePayload *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayload > *smartarg1 = 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayload > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayload *)(smartarg1 ? smartarg1->get() : 0);
+ result = (bool)(arg1)->isRespPacket();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessagePayloadBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::protocol::MessagePayloadBuilder *arg1 = (ppc::protocol::MessagePayloadBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayloadBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayloadBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayloadBuilder_1build_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayloadBuilder *arg1 = (ppc::protocol::MessagePayloadBuilder *) 0 ;
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *smartarg1 = 0 ;
+ ppc::protocol::MessagePayload::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayloadBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayloadBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ result = (arg1)->build();
+ *(ppc::protocol::MessagePayload::Ptr **)&jresult = result ? new ppc::protocol::MessagePayload::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessagePayloadBuilder_1build_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::protocol::MessagePayloadBuilder *arg1 = (ppc::protocol::MessagePayloadBuilder *) 0 ;
+ bcos::bytesConstRef arg2 ;
+ std::shared_ptr< ppc::protocol::MessagePayloadBuilder > *smartarg1 = 0 ;
+ bcos::bytesConstRef *argp2 ;
+ ppc::protocol::MessagePayload::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::protocol::MessagePayloadBuilder > **)&jarg1;
+ arg1 = (ppc::protocol::MessagePayloadBuilder *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::bytesConstRef **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null bcos::bytesConstRef");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (arg1)->build(arg2);
+ *(ppc::protocol::MessagePayload::Ptr **)&jresult = result ? new ppc::protocol::MessagePayload::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1IFrontClient(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::IFrontClient *arg1 = (ppc::front::IFrontClient *) 0 ;
+ std::shared_ptr< ppc::front::IFrontClient > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFrontClient > **)&jarg1;
+ arg1 = (ppc::front::IFrontClient *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFrontClient_1onReceiveMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3) {
+ ppc::front::IFrontClient *arg1 = (ppc::front::IFrontClient *) 0 ;
+ ppc::protocol::Message::Ptr *arg2 = 0 ;
+ SwigValueWrapper< std::function< void (std::shared_ptr< bcos::Error >) > > arg3 ;
+ std::shared_ptr< ppc::front::IFrontClient > *smartarg1 = 0 ;
+ ppc::protocol::Message::Ptr tempnull2 ;
+ ppc::protocol::ReceiveMsgFunc *argp3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFrontClient > **)&jarg1;
+ arg1 = (ppc::front::IFrontClient *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = jarg2 ? *(ppc::protocol::Message::Ptr **)&jarg2 : &tempnull2;
+ argp3 = *(ppc::protocol::ReceiveMsgFunc **)&jarg3;
+ if (!argp3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::ReceiveMsgFunc");
+ return ;
+ }
+ arg3 = *argp3;
+ (arg1)->onReceiveMessage((ppc::protocol::Message::Ptr const &)*arg2,arg3);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1ErrorCallback(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::front::ErrorCallback *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::front::ErrorCallback *)new SwigDirector_ErrorCallback(jenv);
+
+ *(std::shared_ptr< ppc::front::ErrorCallback > **)&jresult = result ? new std::shared_ptr< ppc::front::ErrorCallback >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1ErrorCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::ErrorCallback *arg1 = (ppc::front::ErrorCallback *) 0 ;
+ std::shared_ptr< ppc::front::ErrorCallback > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::ErrorCallback > **)&jarg1;
+ arg1 = (ppc::front::ErrorCallback *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ErrorCallback_1onError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::front::ErrorCallback *arg1 = (ppc::front::ErrorCallback *) 0 ;
+ bcos::Error::Ptr arg2 ;
+ std::shared_ptr< ppc::front::ErrorCallback > *smartarg1 = 0 ;
+ bcos::Error::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::ErrorCallback > **)&jarg1;
+ arg1 = (ppc::front::ErrorCallback *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::Error::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->onError(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ErrorCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
+ std::shared_ptr< ppc::front::ErrorCallback > *obj = *((std::shared_ptr< ppc::front::ErrorCallback > **)&objarg);
+ (void)jcls;
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_ErrorCallback *director = static_cast(obj->operator->());
+ director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_ErrorCallback_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
+ std::shared_ptr< ppc::front::ErrorCallback > *obj = *((std::shared_ptr< ppc::front::ErrorCallback > **)&objarg);
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_ErrorCallback *director = dynamic_cast(obj->operator->());
+ (void)jcls;
+ if (director) {
+ director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
+ }
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1MessageDispatcherHandler(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::front::MessageDispatcherHandler *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::front::MessageDispatcherHandler *)new SwigDirector_MessageDispatcherHandler(jenv);
+
+ *(std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&jresult = result ? new std::shared_ptr< ppc::front::MessageDispatcherHandler >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1MessageDispatcherHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::MessageDispatcherHandler *arg1 = (ppc::front::MessageDispatcherHandler *) 0 ;
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&jarg1;
+ arg1 = (ppc::front::MessageDispatcherHandler *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageDispatcherHandler_1onMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ ppc::front::MessageDispatcherHandler *arg1 = (ppc::front::MessageDispatcherHandler *) 0 ;
+ ppc::protocol::Message::Ptr arg2 ;
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *smartarg1 = 0 ;
+ ppc::protocol::Message::Ptr *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&jarg1;
+ arg1 = (ppc::front::MessageDispatcherHandler *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(ppc::protocol::Message::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ (arg1)->onMessage(arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageDispatcherHandler_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *obj = *((std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&objarg);
+ (void)jcls;
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_MessageDispatcherHandler *director = static_cast(obj->operator->());
+ director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_MessageDispatcherHandler_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
+ std::shared_ptr< ppc::front::MessageDispatcherHandler > *obj = *((std::shared_ptr< ppc::front::MessageDispatcherHandler > **)&objarg);
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_MessageDispatcherHandler *director = dynamic_cast(obj->operator->());
+ (void)jcls;
+ if (director) {
+ director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
+ }
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1SendResponseHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ jlong jresult = 0 ;
+ SwigValueWrapper< std::function< void (std::shared_ptr< bcos::bytes > &&) > > arg1 ;
+ ppc::protocol::SendResponseFunction *argp1 ;
+ ppc::front::SendResponseHandler *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ argp1 = *(ppc::protocol::SendResponseFunction **)&jarg1;
+ if (!argp1) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::protocol::SendResponseFunction");
+ return 0;
+ }
+ arg1 = *argp1;
+ result = (ppc::front::SendResponseHandler *)new ppc::front::SendResponseHandler(arg1);
+ *(ppc::front::SendResponseHandler **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1SendResponseHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::SendResponseHandler *arg1 = (ppc::front::SendResponseHandler *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::front::SendResponseHandler **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_SendResponseHandler_1sendResponse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ ppc::front::SendResponseHandler *arg1 = (ppc::front::SendResponseHandler *) 0 ;
+ std::shared_ptr< bcos::bytes > *arg2 = 0 ;
+ std::unique_ptr< std::shared_ptr< bcos::bytes > > rvrdeleter2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::front::SendResponseHandler **)&jarg1;
+ arg2 = *(std::shared_ptr< bcos::bytes > **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::shared_ptr< bcos::bytes > && is null");
+ return ;
+ }
+ rvrdeleter2.reset(arg2);
+ (arg1)->sendResponse((std::shared_ptr< bcos::bytes > &&)*arg2);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1IMessageHandler(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::front::IMessageHandler *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::front::IMessageHandler *)new SwigDirector_IMessageHandler(jenv);
+
+ *(std::shared_ptr< ppc::front::IMessageHandler > **)&jresult = result ? new std::shared_ptr< ppc::front::IMessageHandler >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1IMessageHandler(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::IMessageHandler *arg1 = (ppc::front::IMessageHandler *) 0 ;
+ std::shared_ptr< ppc::front::IMessageHandler > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IMessageHandler > **)&jarg1;
+ arg1 = (ppc::front::IMessageHandler *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IMessageHandler_1onMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
+ ppc::front::IMessageHandler *arg1 = (ppc::front::IMessageHandler *) 0 ;
+ bcos::Error::Ptr arg2 ;
+ ppc::protocol::Message::Ptr arg3 ;
+ SwigValueWrapper< ppc::front::SendResponseHandler > arg4 ;
+ std::shared_ptr< ppc::front::IMessageHandler > *smartarg1 = 0 ;
+ bcos::Error::Ptr *argp2 ;
+ ppc::protocol::Message::Ptr *argp3 ;
+ ppc::front::SendResponseHandler *argp4 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ (void)jarg3_;
+ (void)jarg4_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IMessageHandler > **)&jarg1;
+ arg1 = (ppc::front::IMessageHandler *)(smartarg1 ? smartarg1->get() : 0);
+ argp2 = *(bcos::Error::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ argp3 = *(ppc::protocol::Message::Ptr **)&jarg3;
+ if (argp3) arg3 = *argp3;
+ argp4 = *(ppc::front::SendResponseHandler **)&jarg4;
+ if (!argp4) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null ppc::front::SendResponseHandler");
+ return ;
+ }
+ arg4 = *argp4;
+ (arg1)->onMessage(arg2,arg3,arg4);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IMessageHandler_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
+ std::shared_ptr< ppc::front::IMessageHandler > *obj = *((std::shared_ptr< ppc::front::IMessageHandler > **)&objarg);
+ (void)jcls;
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_IMessageHandler *director = static_cast(obj->operator->());
+ director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IMessageHandler_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
+ std::shared_ptr< ppc::front::IMessageHandler > *obj = *((std::shared_ptr< ppc::front::IMessageHandler > **)&objarg);
+ // Keep a local instance of the smart pointer around while we are using the raw pointer
+ // Avoids using smart pointer specific API.
+ SwigDirector_IMessageHandler *director = dynamic_cast(obj->operator->());
+ (void)jcls;
+ if (director) {
+ director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
+ }
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1IFront(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->start();
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->stop();
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1register_1topic_1handler(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ ppc::front::MessageDispatcherHandler::Ptr arg3 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::front::MessageDispatcherHandler::Ptr *argp3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ argp3 = *(ppc::front::MessageDispatcherHandler::Ptr **)&jarg3;
+ if (argp3) arg3 = *argp3;
+ (arg1)->register_topic_handler((std::string const &)*arg2,arg3);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1register_1msg_1handler(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ ppc::front::MessageDispatcherHandler::Ptr arg3 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::front::MessageDispatcherHandler::Ptr *argp3 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return ;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ argp3 = *(ppc::front::MessageDispatcherHandler::Ptr **)&jarg3;
+ if (argp3) arg3 = *argp3;
+ (arg1)->register_msg_handler((std::string const &)*arg2,arg3);
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1async_1send_1message(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_, jbyteArray jarg4, jobject jarg5, jint jarg6, jint jarg7, jlong jarg8, jobject jarg8_, jlong jarg9, jobject jarg9_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ uint16_t arg2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg3 = 0 ;
+ char *arg4 = (char *) 0 ;
+ uint64_t arg5 ;
+ int arg6 ;
+ long arg7 ;
+ ppc::front::ErrorCallback::Ptr arg8 ;
+ ppc::front::IMessageHandler::Ptr arg9 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull3 ;
+ ppc::front::ErrorCallback::Ptr *argp8 ;
+ ppc::front::IMessageHandler::Ptr *argp9 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+ (void)jarg8_;
+ (void)jarg9_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ arg3 = jarg3 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg3 : &tempnull3;
+ {
+ arg4 = (char *) jenv->GetByteArrayElements(jarg4, 0);
+ }
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg5) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return ;
+ }
+ clazz = jenv->GetObjectClass(jarg5);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg5, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg5 = 0;
+ if (sz > 0) {
+ arg5 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ arg6 = (int)jarg6;
+ arg7 = (long)jarg7;
+ argp8 = *(ppc::front::ErrorCallback::Ptr **)&jarg8;
+ if (argp8) arg8 = *argp8;
+ argp9 = *(ppc::front::IMessageHandler::Ptr **)&jarg9;
+ if (argp9) arg9 = *argp9;
+ (arg1)->async_send_message(arg2,(ppc::protocol::MessageOptionalHeader::Ptr const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
+ {
+ jenv->ReleaseByteArrayElements(jarg4, (jbyte *) arg4, 0);
+ }
+
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1async_1send_1response(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jlong jarg4, jobject jarg4_, jint jarg5, jlong jarg6, jobject jarg6_) {
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ bcos::bytes *arg2 = 0 ;
+ std::string *arg3 = 0 ;
+ bcos::bytes *arg4 = 0 ;
+ int arg5 ;
+ ppc::front::ErrorCallback::Ptr arg6 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ std::unique_ptr< bcos::bytes > rvrdeleter4 ;
+ ppc::front::ErrorCallback::Ptr *argp6 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ (void)jarg4_;
+ (void)jarg6_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+
+ arg2 = (bcos::bytes *)((*(std::shared_ptr< const bcos::bytes > **)&jarg2) ? (*(std::shared_ptr< const bcos::bytes > **)&jarg2)->get() : 0);
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes const & reference is null");
+ return ;
+ }
+ if(!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return ;
+ }
+ const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3_pstr) return ;
+ std::string arg3_str(arg3_pstr);
+ arg3 = &arg3_str;
+ jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
+ arg4 = *(bcos::bytes **)&jarg4;
+ if (!arg4) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes && is null");
+ return ;
+ }
+ rvrdeleter4.reset(arg4);
+ arg5 = (int)jarg5;
+ argp6 = *(ppc::front::ErrorCallback::Ptr **)&jarg6;
+ if (argp6) arg6 = *argp6;
+ (arg1)->async_send_response((bcos::bytes const &)*arg2,(std::string const &)*arg3,(bcos::bytes &&)*arg4,arg5,arg6);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1push_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_, jint jarg5, jint jarg6) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ uint16_t arg2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg3 = 0 ;
+ bcos::bytes *arg4 = 0 ;
+ int arg5 ;
+ long arg6 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull3 ;
+ std::unique_ptr< bcos::bytes > rvrdeleter4 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+ (void)jarg4_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ arg3 = jarg3 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg3 : &tempnull3;
+ arg4 = *(bcos::bytes **)&jarg4;
+ if (!arg4) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bcos::bytes && is null");
+ return 0;
+ }
+ rvrdeleter4.reset(arg4);
+ arg5 = (int)jarg5;
+ arg6 = (long)jarg6;
+ result = (arg1)->push(arg2,(ppc::protocol::MessageOptionalHeader::Ptr const &)*arg3,(bcos::bytes &&)*arg4,arg5,arg6);
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1push_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_, jbyteArray jarg4, jobject jarg5, jint jarg6, jint jarg7) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ uint16_t arg2 ;
+ ppc::protocol::MessageOptionalHeader::Ptr *arg3 = 0 ;
+ char *arg4 = (char *) 0 ;
+ uint64_t arg5 ;
+ int arg6 ;
+ long arg7 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeader::Ptr tempnull3 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg3_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = (uint16_t)jarg2;
+ arg3 = jarg3 ? *(ppc::protocol::MessageOptionalHeader::Ptr **)&jarg3 : &tempnull3;
+ {
+ arg4 = (char *) jenv->GetByteArrayElements(jarg4, 0);
+ }
+ {
+ jclass clazz;
+ jmethodID mid;
+ jbyteArray ba;
+ jbyte* bae;
+ jsize sz;
+ int i;
+
+ if (!jarg5) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
+ return 0;
+ }
+ clazz = jenv->GetObjectClass(jarg5);
+ mid = jenv->GetMethodID(clazz, "toByteArray", "()[B");
+ ba = (jbyteArray)jenv->CallObjectMethod(jarg5, mid);
+ bae = jenv->GetByteArrayElements(ba, 0);
+ sz = jenv->GetArrayLength(ba);
+ arg5 = 0;
+ if (sz > 0) {
+ arg5 = (uint64_t)(signed char)bae[0];
+ for(i=1; iReleaseByteArrayElements(ba, bae, 0);
+ }
+ arg6 = (int)jarg6;
+ arg7 = (long)jarg7;
+ result = (arg1)->push(arg2,(ppc::protocol::MessageOptionalHeader::Ptr const &)*arg3,arg4,arg5,arg6,arg7);
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ {
+ jenv->ReleaseByteArrayElements(jarg4, (jbyte *) arg4, 0);
+ }
+
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ long arg3 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::protocol::Message::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ arg3 = (long)jarg3;
+ result = (arg1)->pop((std::string const &)*arg2,arg3);
+ *(ppc::protocol::Message::Ptr **)&jresult = result ? new ppc::protocol::Message::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1peek(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ ppc::protocol::Message::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ result = (arg1)->peek((std::string const &)*arg2);
+ *(ppc::protocol::Message::Ptr **)&jresult = result ? new ppc::protocol::Message::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1registerNodeInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ ppc::protocol::INodeInfo::Ptr *arg2 = 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ arg2 = *(ppc::protocol::INodeInfo::Ptr **)&jarg2;
+ if (!arg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "ppc::protocol::INodeInfo::Ptr const & is null");
+ return 0;
+ }
+ result = (arg1)->registerNodeInfo((ppc::protocol::INodeInfo::Ptr const &)*arg2);
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1unRegisterNodeInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ result = (arg1)->unRegisterNodeInfo();
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1registerTopic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ result = (arg1)->registerTopic((std::string const &)*arg2);
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1unRegisterTopic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jlong jresult = 0 ;
+ ppc::front::IFront *arg1 = (ppc::front::IFront *) 0 ;
+ std::string *arg2 = 0 ;
+ std::shared_ptr< ppc::front::IFront > *smartarg1 = 0 ;
+ bcos::Error::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ arg1 = (ppc::front::IFront *)(smartarg1 ? smartarg1->get() : 0);
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ std::string arg2_str(arg2_pstr);
+ arg2 = &arg2_str;
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ result = (arg1)->unRegisterTopic((std::string const &)*arg2);
+ *(bcos::Error::Ptr **)&jresult = result ? new bcos::Error::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1IFrontBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::front::IFrontBuilder *arg1 = (ppc::front::IFrontBuilder *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::front::IFrontBuilder **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFrontBuilder_1buildClient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jboolean jarg4) {
+ jlong jresult = 0 ;
+ ppc::front::IFrontBuilder *arg1 = (ppc::front::IFrontBuilder *) 0 ;
+ std::string arg2 ;
+ std::function< void () > arg3 ;
+ bool arg4 ;
+ std::function< void () > *argp3 ;
+ ppc::front::IFrontClient::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::front::IFrontBuilder **)&jarg1;
+ if(!jarg2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2_pstr) return 0;
+ (&arg2)->assign(arg2_pstr);
+ jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
+ argp3 = *(std::function< void () > **)&jarg3;
+ if (!argp3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null std::function< void () >");
+ return 0;
+ }
+ arg3 = *argp3;
+ arg4 = jarg4 ? true : false;
+ result = ((ppc::front::IFrontBuilder const *)arg1)->buildClient(arg2,arg3,arg4);
+ *(ppc::front::IFrontClient::Ptr **)&jresult = result ? new ppc::front::IFrontClient::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_SDKMode_1AIR_1get(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ ppc::sdk::SDKMode result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::sdk::SDKMode)ppc::sdk::SDKMode::AIR;
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_SDKMode_1PRO_1get(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ ppc::sdk::SDKMode result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::sdk::SDKMode)ppc::sdk::SDKMode::PRO;
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1TransportBuilder(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ ppc::sdk::TransportBuilder *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (ppc::sdk::TransportBuilder *)new ppc::sdk::TransportBuilder();
+ *(ppc::sdk::TransportBuilder **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1TransportBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::sdk::TransportBuilder *arg1 = (ppc::sdk::TransportBuilder *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(ppc::sdk::TransportBuilder **)&jarg1;
+ delete arg1;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_TransportBuilder_1buildProTransport(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ jlong jresult = 0 ;
+ ppc::sdk::TransportBuilder *arg1 = (ppc::sdk::TransportBuilder *) 0 ;
+ ppc::front::FrontConfig::Ptr arg2 ;
+ ppc::front::FrontConfig::Ptr *argp2 ;
+ ppc::sdk::Transport::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(ppc::sdk::TransportBuilder **)&jarg1;
+ argp2 = *(ppc::front::FrontConfig::Ptr **)&jarg2;
+ if (argp2) arg2 = *argp2;
+ result = (arg1)->buildProTransport(arg2);
+ *(ppc::sdk::Transport::Ptr **)&jresult = result ? new ppc::sdk::Transport::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_TransportBuilder_1buildConfig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3) {
+ jlong jresult = 0 ;
+ ppc::sdk::TransportBuilder *arg1 = (ppc::sdk::TransportBuilder *) 0 ;
+ int arg2 ;
+ std::string arg3 ;
+ ppc::front::FrontConfig::Ptr result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::sdk::TransportBuilder **)&jarg1;
+ arg2 = (int)jarg2;
+ if(!jarg3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ return 0;
+ }
+ const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3_pstr) return 0;
+ (&arg3)->assign(arg3_pstr);
+ jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
+ result = (arg1)->buildConfig(arg2,arg3);
+ *(ppc::front::FrontConfig::Ptr **)&jresult = result ? new ppc::front::FrontConfig::Ptr(result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_TransportBuilder_1frontConfigBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::TransportBuilder *arg1 = (ppc::sdk::TransportBuilder *) 0 ;
+ ppc::front::FrontConfigBuilder::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(ppc::sdk::TransportBuilder **)&jarg1;
+ result = (ppc::front::FrontConfigBuilder::Ptr *) &(arg1)->frontConfigBuilder();
+ *(ppc::front::FrontConfigBuilder::Ptr **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_new_1Transport(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::front::FrontConfig::Ptr arg1 ;
+ ppc::front::FrontConfig::Ptr *argp1 ;
+ ppc::sdk::Transport *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ argp1 = *(ppc::front::FrontConfig::Ptr **)&jarg1;
+ if (argp1) arg1 = *argp1;
+ result = (ppc::sdk::Transport *)new ppc::sdk::Transport(arg1);
+
+ *(std::shared_ptr< ppc::sdk::Transport > **)&jresult = result ? new std::shared_ptr< ppc::sdk::Transport >(result SWIG_NO_NULL_DELETER_1) : 0;
+
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_delete_1Transport(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+
+ smartarg1 = *(std::shared_ptr< ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ (void)arg1; delete smartarg1;
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->start();
+}
+
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport > *smartarg1 = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ (arg1)->stop();
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1getFront(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::front::IFront::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::front::IFront::Ptr *) &((ppc::sdk::Transport const *)arg1)->getFront();
+ *(ppc::front::IFront::Ptr **)&jresult = *result ? new ppc::front::IFront::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1gateway(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::gateway::IGateway::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::gateway::IGateway::Ptr *) &((ppc::sdk::Transport const *)arg1)->gateway();
+ *(ppc::gateway::IGateway::Ptr **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1msgPayloadBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::protocol::MessagePayloadBuilder::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::MessagePayloadBuilder::Ptr *) &((ppc::sdk::Transport const *)arg1)->msgPayloadBuilder();
+ *(ppc::protocol::MessagePayloadBuilder::Ptr **)&jresult = *result ? new ppc::protocol::MessagePayloadBuilder::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1msgBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::protocol::MessageBuilder::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::MessageBuilder::Ptr *) &((ppc::sdk::Transport const *)arg1)->msgBuilder();
+ *(ppc::protocol::MessageBuilder::Ptr **)&jresult = *result ? new ppc::protocol::MessageBuilder::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1msgHeaderBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::protocol::MessageHeaderBuilder::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::MessageHeaderBuilder::Ptr *) &((ppc::sdk::Transport const *)arg1)->msgHeaderBuilder();
+ *(ppc::protocol::MessageHeaderBuilder::Ptr **)&jresult = *result ? new ppc::protocol::MessageHeaderBuilder::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1routeInfoBuilder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::protocol::MessageOptionalHeaderBuilder::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::protocol::MessageOptionalHeaderBuilder::Ptr *) &((ppc::sdk::Transport const *)arg1)->routeInfoBuilder();
+ *(ppc::protocol::MessageOptionalHeaderBuilder::Ptr **)&jresult = *result ? new ppc::protocol::MessageOptionalHeaderBuilder::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_Transport_1getConfig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ ppc::sdk::Transport *arg1 = (ppc::sdk::Transport *) 0 ;
+ std::shared_ptr< ppc::sdk::Transport const > *smartarg1 = 0 ;
+ ppc::front::FrontConfig::Ptr *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+
+ smartarg1 = *(std::shared_ptr< const ppc::sdk::Transport > **)&jarg1;
+ arg1 = (ppc::sdk::Transport *)(smartarg1 ? smartarg1->get() : 0);
+ result = (ppc::front::FrontConfig::Ptr *) &((ppc::sdk::Transport const *)arg1)->getConfig();
+ *(ppc::front::FrontConfig::Ptr **)&jresult = *result ? new ppc::front::FrontConfig::Ptr(*result) : 0;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_IFront_1SWIGSmartPtrUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ jlong baseptr = 0;
+ std::shared_ptr< ppc::front::IFront > *argp1;
+ (void)jenv;
+ (void)jcls;
+ argp1 = *(std::shared_ptr< ppc::front::IFront > **)&jarg1;
+ *(std::shared_ptr< ppc::front::IFrontClient > **)&baseptr = argp1 ? new std::shared_ptr< ppc::front::IFrontClient >(*argp1) : 0;
+ return baseptr;
+}
+
+SWIGEXPORT void JNICALL Java_com_webank_wedpr_sdk_jni_generated_wedpr_1java_1transportJNI_swig_1module_1init(JNIEnv *jenv, jclass jcls) {
+ int i;
+
+ static struct {
+ const char *method;
+ const char *signature;
+ } methods[3] = {
+ {
+ "SwigDirector_ErrorCallback_onError", "(Lcom/webank/wedpr/sdk/jni/generated/ErrorCallback;J)V"
+ },
+ {
+ "SwigDirector_MessageDispatcherHandler_onMessage", "(Lcom/webank/wedpr/sdk/jni/generated/MessageDispatcherHandler;J)V"
+ },
+ {
+ "SwigDirector_IMessageHandler_onMessage", "(Lcom/webank/wedpr/sdk/jni/generated/IMessageHandler;JJJ)V"
+ }
+ };
+ Swig::jclass_wedpr_java_transportJNI = (jclass) jenv->NewGlobalRef(jcls);
+ if (!Swig::jclass_wedpr_java_transportJNI) return;
+ for (i = 0; i < (int) (sizeof(methods)/sizeof(methods[0])); ++i) {
+ Swig::director_method_ids[i] = jenv->GetStaticMethodID(jcls, methods[i].method, methods[i].signature);
+ if (!Swig::director_method_ids[i]) return;
+ }
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.h b/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.h
new file mode 100644
index 00000000..89b6596b
--- /dev/null
+++ b/cpp/wedpr-transport/sdk-wrapper/java/src/wedpr_java_transportJAVA_wrap.h
@@ -0,0 +1,58 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (https://www.swig.org).
+ * Version 4.2.1
+ *
+ * Do not make changes to this file unless you know what you are doing - modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+#ifndef SWIG_wedpr_java_transport_WRAP_H_
+#define SWIG_wedpr_java_transport_WRAP_H_
+
+class SwigDirector_ErrorCallback : public ppc::front::ErrorCallback, public Swig::Director {
+
+public:
+ void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
+ SwigDirector_ErrorCallback(JNIEnv *jenv);
+ virtual ~SwigDirector_ErrorCallback();
+ virtual void onError(bcos::Error::Ptr error);
+public:
+ bool swig_overrides(int n) {
+ return (n < 1 ? swig_override[n] : false);
+ }
+protected:
+ Swig::BoolArray<1> swig_override;
+};
+
+class SwigDirector_MessageDispatcherHandler : public ppc::front::MessageDispatcherHandler, public Swig::Director {
+
+public:
+ void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
+ SwigDirector_MessageDispatcherHandler(JNIEnv *jenv);
+ virtual ~SwigDirector_MessageDispatcherHandler();
+ virtual void onMessage(ppc::protocol::Message::Ptr msg);
+public:
+ bool swig_overrides(int n) {
+ return (n < 1 ? swig_override[n] : false);
+ }
+protected:
+ Swig::BoolArray<1> swig_override;
+};
+
+class SwigDirector_IMessageHandler : public ppc::front::IMessageHandler, public Swig::Director {
+
+public:
+ void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
+ SwigDirector_IMessageHandler(JNIEnv *jenv);
+ virtual ~SwigDirector_IMessageHandler();
+ virtual void onMessage(bcos::Error::Ptr e,ppc::protocol::Message::Ptr msg,ppc::front::SendResponseHandler sendResponseHandler);
+public:
+ bool swig_overrides(int n) {
+ return (n < 1 ? swig_override[n] : false);
+ }
+protected:
+ Swig::BoolArray<1> swig_override;
+};
+
+
+#endif