[zeromq-dev] Regarding java binding of 0MQ.

gonzalo diethelm gdiethelm at dcv.cl
Tue Nov 23 15:45:56 CET 2010


Hello SM,

 

I have been away for a while, first on a trip and then sick at home.
Your comments make a lot of sense, I hope to have some time tomorrow to
follow up.

 

Thanks for pointing these things out. Best regards.

 

 

Gonzalo Diethelm 

 

________________________________

From: zeromq-dev-bounces at lists.zeromq.org
[mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of SM
Sent: Monday, 22 November, 2010 19:17
To: zeromq-dev at lists.zeromq.org
Subject: [zeromq-dev] Regarding java binding of 0MQ.

 

Hi,

 

I am trying to use java binding of 0MQ. Following are my
questions/concerns regarding it (Note that before writing this I tried
to search mail archive for relevant discussions to insure I am not
repeating anything which is previously, but might have missed
something):

1. Why Socket/Poller/Context classes are the static inner classes? why
not make them independent classes?

2. When I tried to use Poller.poll() method, it was not doing blocking
call (which I thought would be default behavior) and was returning
immediately, after lot of digging (from Poller.cpp to zmq_poll
documentation) I found out that before calling Poller.poll() one should
set Poller.setTimeout() to -1 to wait indefinitely. This should have
been part of the javadoc of poll() method.

3. Instead of having only one Poller.poll() method why not have two
methods: 1. Poller.poll() with default behavior (to wait indefinitely),
and 2. Poller.poll(timeout) which waits for given time period. Much like
Object.wait() and Object.wait(timeout).

4. Poller.POLLIN/POLLOUT/POLLERR are private static final. How one can
use them in Poller.register (Socket socket, int events)?

 

---

SM


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101123/7ead61ff/attachment.htm>


More information about the zeromq-dev mailing list