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

SM swapnil at hardcodr.com
Mon Nov 22 23:16:39 CET 2010


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()
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)?

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

More information about the zeromq-dev mailing list