ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Life is hard, and then you die" <>
Subject more strongly typed invoker
Date Tue, 18 Nov 2003 02:02:48 GMT


I would like to be able provide a handler and have the methods
automatically looked up, just like the Invoker does, but export
only a subset of the available methods, as defined by an interface
(the case I'm running into this is when the handlers are avalon
components - they implement various interfaces, but only one of them is
what I'd like to export as rpc methods). One minimal change to
accomplish this would be to add another constructor to
org.apache.xmlrpc.Invoker which takes both the targetObject and the

      * Create a new Invoker instance which limits the methods that can be
      * invoked on the target. The invoker will only invoke methods on the
      * given target which are defined as public in the given interface class.
      * @param target the object on which to invoke the methods
      * @param iface  the exported methods that can be invoked
     public Invoker(Object target, Class iface)
        if (!iface.isInstance(target))
            throw new IllegalArgumentException("target " + target + " is not an instance of
" + iface.getName());
         invokeTarget = target;
         targetClass = iface;

Does this sound like a reasonable enhancement?



View raw message