Results 21 to 21 of 21
- 08-12-2011, 10:38 PM #21Member
- Join Date
- Aug 2011
- Rep Power
To "serialize a function pointer" in Java, I would consider...
- Write the fully qualified class name + method name + fully qualified class names of parameters (with tricks for arrays, lists, etc), and use reflection to call the (presumably static) method.
- If performance is a big issue, consider generating byte code at run time to make the calls.
- [simpler and very fast...] Keep a Map of names to instances on each machine, and serialize "host name" and "instance name" across the wire.
With the last two, you will probably want to make calls through interfaces.
- By omripe in forum XMLReplies: 3Last Post: 07-27-2011, 01:07 PM
- By jaxber in forum New To JavaReplies: 3Last Post: 04-29-2011, 01:08 AM
- By Sandia_man in forum New To JavaReplies: 8Last Post: 08-29-2010, 03:36 AM
- By kishan in forum Advanced JavaReplies: 2Last Post: 04-26-2009, 12:46 AM
- By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM