Actually I don't think we need DescriptorPool in Java. DescriptorPool was primarily written for the purpose of memory management, but Java handles that for us. If all you need is the mapping aspect, just build a Map<String, ServiceDescriptor> yourself and use it.
True, in C++ there is the "global pool" which is automatically populated with everything compiled into the binary. This wouldn't work in Java because classes are not loaded until they are first accessed, so there is no way to populate this pool. Besides, singletons are evil. I honestly wish that I'd never introduced the global pool in C++; it has lead to too many subtle singleton problems. 2009/12/9 Jason Hsueh <jas...@google.com> > No, there isn't an equivalent to the DescriptorPool in Java. If you know > the types that you want you can build a mapping yourself. Or if you'd be > interested in porting the C++ DescriptorPool to java that would be great! > > 2009/12/9 Romain François <francoisrom...@free.fr> > > Hello, >> >> Given a service/method full name, I'd like to get hold of the >> ServiceDescriptor, or MethodDescriptor. In C++ I would use the >> DescriptorPool, but I don't see this in the java api. >> >> Is there a way ? >> >> Romain >> >> >> -- >> Romain Francois >> Professional R Enthusiast >> +33(0) 6 28 91 30 30 >> http://romainfrancois.blog.free.fr >> |- http://tr.im/Gq7i : ohloh >> |- http://tr.im/FtUu : new package : highlight >> `- http://tr.im/EAD5 : LondonR slides >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To post to this group, send email to proto...@googlegroups.com. >> To unsubscribe from this group, send email to >> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/protobuf?hl=en. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.