* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
- (JNIEnv *, jclass);
+ (JNIEnv *, jobject);
+
+/*
+ * Class: org_ocera_orte_types_DomainEvents
+ * Method: jORTEDomainEventsDestroy
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ocera_orte_types_DomainEvents_jORTEDomainEventsDestroy
+ (JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
@Override
public boolean destroy()
{
- if(destroyAllRegTypes() && jORTEDomainAppDestroy(this.handle) && (this.props == null || this.props.destroy())) return true;
+ if(destroyAllRegTypes() && jORTEDomainAppDestroy(this.handle)
+ && (this.props == null || this.props.destroy())
+ && (this.events == null || this.events.destroy())) return true;
System.out.println(":j!: ORTEDomainAppDestroy() fault..");
return false;
}
public
boolean destroy()
{
- if(jORTEDomainMgrDestroy(this.handle) && (this.props == null || this.props.destroy())) return true;
+ if(jORTEDomainMgrDestroy(this.handle)
+ && (this.props == null || this.props.destroy())
+ && (this.events == null || this.events.destroy())) return true;
System.out.println(":j!: ORTEDomainMgrDestroy() fault..");
return false;
}
jORTEVerbositySetLogFile(logfile);
}
- public static
- void appSendThread(long dhandle)
- {
- jORTEAppSendThread(dhandle);
- }
-
-
/* ****************************************************************** *
* *
private static native
void jORTEVerbositySetLogFile(String logfile);
-
- /**
- * jORTEVerbositySetLogFile -
- *
- *
- * @return void
- */
- private static native
- void jORTEAppSendThread(long dhandle);
-
-
}
}
public DomainEvents()
- {
- init();
- System.out.println(":j: events created & initialized..");
- }
-
-
- /**
- * Initializes DomainEvents and return their handle
- * @return handle initialized DomainEvents
- */
- public void init()
{
this.handle = jORTEDomainInitEvents();
- return;
+ System.out.println(":j: events created & initialized..");
}
-
public long getHandle()
{
return this.handle;
}
+ public boolean destroy()
+ {
+ System.out.println(":j: DomainEvents destroy called..");
+
+ if(!jORTEDomainEventsDestroy(this.handle)) {
+ System.out.println(":j: DomainEvents destroy fault!");
+ return false;
+ }
+ else {
+ System.out.println(":j: DomainEvents destroy successful..");
+ return true;
+ }
+ }
+
public abstract void onRegFail();
public abstract void onMgrNew(AppInfo appInfo);
public abstract void onMgrDelete(AppInfo appInfo);
*
* @return handler to default properties of a domain, NULL if error
*/
- private static native
+ private native
long jORTEDomainInitEvents();
-
-
+ private native
+ boolean jORTEDomainEventsDestroy(long handle);
}
--- /dev/null
+#include <stdlib.h>
+// origin orte headers
+#include "orte.h"
+// pregenerated header
+#include "jorte/org_ocera_orte_types_DomainEvents.h"
+#include "jorte/4all.h"
+#include "jorte/jorte_typedefs_defines.h"
+
+JNIEXPORT jboolean JNICALL
+Java_org_ocera_orte_types_DomainEvents_jORTEDomainEventsDestroy
+(JNIEnv *env, jobject obj, jlong handle)
+{
+ free((void*)handle);
+
+ #ifdef TEST_STAGE
+ printf(":c: events destroyed.. \n");
+ #endif
+
+ return 1;
+}
JNIEXPORT jlong JNICALL
Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
-(JNIEnv *env, jclass cls)
+(JNIEnv *env, jobject obj)
{
ORTEDomainAppEvents *evs;
JNtpTimeToStringUs.c \
JORTEDomainAppCreate.c \
JORTEDomainAppDestroy.c \
+JORTEDomainEvents.c \
+JORTEDomainEventsDestroy.c \
JORTEDomainInitEvents.c \
JORTEDomainMgrCreate.c \
JORTEDomainMgrDestroy.c \
JORTEDomainAppCreate.c \
JORTEDomainAppDestroy.c \
JORTEDomainEvents.c \
+JORTEDomainEventsDestroy.c \
JORTEDomainInitEvents.c \
JORTEDomainMgrCreate.c \
JORTEDomainMgrDestroy.c \