Hi,

I recently needed to add introspection support so a user could use one of the 
C++ auto glue generation frameworks.  I found an OLD set of patches for this, 
but they were very out of date.  Instead of using these, I kept the same 
usage pattern but made a new implementation based on the current 1.2 code 
base.

I've implemented this support by making the following changes:

* Create IntrospectiveHandlerMapping - a subclass of HandlerMapping that 
allows iteration over the list of handlers.

* Create a new subclass of SystemHandler called IntrospectiveHandler.  This 
class implements the system.listMethods, system.methodHelp and 
system.methodSignature calls.  I decided to make a subclass, because I 
thought some may not want introspection.

  The listMethods/methodHelp functions use the same 'marker' system the old 
patches did. i.e. to mark a method as public via XMLRPC, you must declare a 
static of the form:
        static [final] public boolean <methodName>_public = true;
This is necessary to avoid exposing a zillion of public methods which are not 
intended for XMLRPC.

If you wish to provide 'help text' via introspection, you can optionally 
define a static string of the form:
        static [final] public String <methodName>_help = "This method will make you 
rich";

* I've also changed the sample server to use this IntrospectiveHandler 
instead of the old SystemHandler.

* I've created a Servlet to automate the dispatching to handlers 

Do ya'll want any of these changes?  Who should I send the diffs to?  

Ispiri is happy to contribute these changes under the Apache license.

Kevin

Reply via email to