com.xensource.xenapi
Class ConnectionHelper

java.lang.Object
  extended by com.xensource.xenapi.ConnectionHelper

public class ConnectionHelper
extends Object


Nested Class Summary
static class ConnectionHelper.NoConnectionOnThisThreadException
           
 
Method Summary
 Map dispatch(String method_call, Object[] method_params)
           
static ConnectionHelper getConnectionHelper()
          Like ConnectionHelper.instance, excepts returns null if no instance exists
protected  String getSession()
           
static ConnectionHelper instance()
          Get this thread's connection helper
static void setConnectionHelper(ConnectionHelper helper)
          Use this method to share connection helpers (and therefore connections and sessions) across threads.
 void setSession(Session session)
           
static void setup(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setup

public static void setup(String url)
                  throws MalformedURLException
Throws:
MalformedURLException

setConnectionHelper

public static void setConnectionHelper(ConnectionHelper helper)
Use this method to share connection helpers (and therefore connections and sessions) across threads.


getConnectionHelper

public static ConnectionHelper getConnectionHelper()
Like ConnectionHelper.instance, excepts returns null if no instance exists


instance

public static ConnectionHelper instance()
                                 throws ConnectionHelper.NoConnectionOnThisThreadException
Get this thread's connection helper

Throws:
ConnectionHelper.NoConnectionOnThisThreadException

getSession

protected String getSession()

setSession

public void setSession(Session session)

dispatch

public Map dispatch(String method_call,
                    Object[] method_params)
             throws XmlRpcException
Throws:
XmlRpcException