After figuring out how to implement the system.* methods, I wanted to
change the default implementation that generates the methodHelp strings.
I thought it would be nice to be able to document method handlers like this:
@MethodHelp(“Returns cumulative RTP packet loss for call.”)
public int lostPackets(String callId)
{
// ...
}
Rpc calls to system.methodHelp("com.logitel.vx.lostPackets") will then
return the MethodHelp annotation value.
I created a new class to define the annotation itself, and only other
change I had to make was to replace getMethodHelp(Class pClass, Method
pMethod) in org/apache/xmlrpc/metadata/Util.java with this:
public static String getMethodHelp(Class pClass, Method pMethod)
{
MethodHelp mh = (MethodHelp)pMethod.getAnnotation(MethodHelp.class);
if (mh != null) return mh.value();
else return "help not available for this method";
}
Any comments or suggestions on this? So far this is working pretty good
for us.
--Ryan
--
Ryan Mitchell
LogiTel Corp.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]