Hello,

 

I have a question regarding implementing the "async" interface for the
XenAPI RPC methods. We have chosen Apache XML-RPC Java library to do our
XenAPI implementation (server side). So for each XenAPI class I have a
corresponding Java class which implements the XenAPI methods and an
entry in the XmlRpcServlet.properties file.

 

So for example, my XmlRpcServlet.properties file look like:

 

PBD=com.mycompany.xenapi.classes.PBD

host_cpu=com.mycompany.xenapi.classes.HostCpu

VDI=com.mycompany.xenapi.classes.VDI

..

 

My question is what is the easiest way to implement and provide the
"async" interface to these existing classes and RPC methods, while
leveraging the work already done for the "sync" version.

 

Do I need to implement the Async version for each class (perhaps by
leveraging and extending the sync version) and then add a new mapping
like

 

Async.PBD=com.mycompany.xenapi.classes.PBDAsync

Async.host_cpu=com.mycompany.xenapi.classes.HostCpuAsync

Async.VDI=com.mycompany.xenapi.classes.VDIAsync

 

Or is there a way to implement one class to front all "async" methods
which can then forward the request to the sync class with a special
flag? How?

 

Async=com.mycompany.xenapi.classes.AsyncHandler

 

 

Any suggestions?

 

-Ajay

_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to