public class Connection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
_connWait
Deprecated.
This field is not used any more. To set the connection timeout
for xml-rpc calls, please use the appropriate Connection constructor.
|
protected int |
_replyWait
Deprecated.
This field is not used any more. To set the reply timeout
for xml-rpc calls, please use the appropriate Connection constructor.
|
static java.lang.String |
BINDINGS_VERSION
Deprecated.
This field is not used any more.
|
protected static int |
DEFAULT_CONNECTION_TIMEOUT
Default connection timeout for xml-rpc calls in seconds
|
protected static int |
DEFAULT_REPLY_TIMEOUT
Default reply timeout for xml-rpc calls in seconds
|
Constructor and Description |
---|
Connection(java.net.URL url)
Creates a connection to a particular server using a given url.
|
Connection(java.net.URL url,
int replyTimeout,
int connTimeout)
Creates a connection to a particular server using a given url.
|
Connection(java.net.URL url,
java.lang.String sessionReference)
Creates a connection to a particular server using a given url.
|
Connection(java.net.URL url,
java.lang.String sessionReference,
int replyTimeout,
int connTimeout)
Creates a connection to a particular server using a given url.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Map |
dispatch(java.lang.String method_call,
java.lang.Object[] method_params)
The (auto-generated parts of) the bindings dispatch XMLRPC calls on this Connection's client through this method.
|
APIVersion |
getAPIVersion()
Updated when Session.login_with_password() is called.
|
org.apache.xmlrpc.client.XmlRpcClientConfigImpl |
getConfig() |
java.lang.String |
getSessionReference() |
@Deprecated public static final java.lang.String BINDINGS_VERSION
protected static final int DEFAULT_REPLY_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT
@Deprecated protected int _replyWait
@Deprecated protected int _connWait
public Connection(java.net.URL url)
url
- The URL of the server to connect topublic Connection(java.net.URL url, int replyTimeout, int connTimeout)
url
- The URL of the server to connect toreplyTimeout
- The reply timeout for xml-rpc calls in secondsconnTimeout
- The connection timeout for xml-rpc calls in secondspublic Connection(java.net.URL url, java.lang.String sessionReference)
url
- The URL of the server to connect tosessionReference
- A reference to a logged-in Session. Any method calls on this
Connection will use it. This constructor does not call Session.loginWithPassword, and dispose() on the resulting
Connection object does not call Session.logout. The programmer is responsible for ensuring the Session is logged
in and out correctly.public Connection(java.net.URL url, java.lang.String sessionReference, int replyTimeout, int connTimeout)
url
- The URL of the server to connect tosessionReference
- A reference to a logged-in Session. Any method calls on this Connection will use it.
This constructor does not call Session.loginWithPassword, and dispose() on the resulting
Connection object does not call Session.logout. The programmer is responsible for
ensuring the Session is logged in and out correctly.replyTimeout
- The reply timeout for xml-rpc calls in secondsconnTimeout
- The connection timeout for xml-rpc calls in secondspublic APIVersion getAPIVersion()
public org.apache.xmlrpc.client.XmlRpcClientConfigImpl getConfig()
public java.lang.String getSessionReference()
protected java.util.Map dispatch(java.lang.String method_call, java.lang.Object[] method_params) throws org.apache.xmlrpc.XmlRpcException, Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.XenAPIException