From 50a8b9ea0c4a819073b46449dee8fc839b837ae5 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 20 Sep 2009 10:14:21 +0200 Subject: 'flags' parameter added to zmq_init --- bindings/java/Context.cpp | 4 ++-- bindings/java/org/zmq/Context.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'bindings/java') diff --git a/bindings/java/Context.cpp b/bindings/java/Context.cpp index 67094e8..d2138c3 100644 --- a/bindings/java/Context.cpp +++ b/bindings/java/Context.cpp @@ -52,7 +52,7 @@ static void raise_exception (JNIEnv *env, int err) } JNIEXPORT void JNICALL Java_org_zmq_Context_construct (JNIEnv *env, jobject obj, - jint app_threads, jint io_threads) + jint app_threads, jint io_threads, jint flags) { if (ctx_handle_fid == NULL) { jclass cls = env->GetObjectClass (obj); @@ -62,7 +62,7 @@ JNIEXPORT void JNICALL Java_org_zmq_Context_construct (JNIEnv *env, jobject obj, env->DeleteLocalRef (cls); } - void *ctx = zmq_init (app_threads, io_threads); + void *ctx = zmq_init (app_threads, io_threads, flags); if (ctx == NULL) { raise_exception (env, errno); return; diff --git a/bindings/java/org/zmq/Context.java b/bindings/java/org/zmq/Context.java index c63ef60..408c6b0 100644 --- a/bindings/java/org/zmq/Context.java +++ b/bindings/java/org/zmq/Context.java @@ -24,14 +24,16 @@ public class Context { System.loadLibrary("jzmq"); } + public static final int POLL = 1; + /** * Class constructor. * * @param appThreads maximum number of application threads. * @param ioThreads size of the threads pool to handle I/O operations. */ - public Context (int appThreads, int ioThreads) { - construct (appThreads, ioThreads); + public Context (int appThreads, int ioThreads, int flags) { + construct (appThreads, ioThreads, flags); } /** @@ -40,7 +42,7 @@ public class Context { public native long createSocket (int type); /** Initialize the JNI interface */ - protected native void construct (int appThreads, int ioThreads); + protected native void construct (int appThreads, int ioThreads, int flags); /** Free resources used by JNI driver. */ protected native void finalize (); -- cgit v1.2.3