[zeromq-dev] Java binding

Martin Sustrik sustrik at 250bpm.com
Mon Feb 22 15:13:25 CET 2010


gonzalo diethelm wrote:

> So, what do you think about the patch? I do believe it better
> encapsulates the dependence of Socket on Context, and it (probably)
> facilitates any future uses of the C interface: if Socket ever needs a
> new function to be added, which depends on the current Context, then it
> will be added to Socket.cpp, NOT to Context.cpp.

Yes. It makes more sense to have to code in Socket.cpp.

One thing troubles me though. I don't like the idea of allowing the 
application to mess with underlying pointers. No other binding allows 
for that and neither should Java binding. Isn't there a way to restrict 
access to contextHandle property so that only Socket object can access it?

Martin




More information about the zeromq-dev mailing list