Client (OpenNebula Cloud API)
Description: declaration: package: org.opennebula.client, class: Client

Package org.opennebula.client

# Class Client

java.lang.Object
org.opennebula.client.Client

public class Client extends Object
This class represents the connection with the core and handles the xml-rpc calls.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `Client.ExtendedTypeFactoryImpl`
  This class extends the TypeFactoryImpl for supporting i8 type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Client()`
  Creates a new xml-rpc client with default options: the auth.
  `Client(String secret, String endpoint)`
  Creates a new xml-rpc client with specified options.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OneResponse`
  `call(String action, Object... args)`
  Performs an XML-RPC call.
  `OneResponse`
  `get_version()`
  Calls OpenNebula and retrieves oned version

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Client

    public Client() throws ClientConfigurationException
    Creates a new xml-rpc client with default options: the auth. file will be assumed to be at $ONE_AUTH, and the endpoint will be set to $ONE_XMLRPC.
    It is the equivalent of Client(null, null).
    Throws:
      `ClientConfigurationException` - if the default configuration options are invalid.

  - ### Client

    public Client(String secret, String endpoint) throws ClientConfigurationException
    Creates a new xml-rpc client with specified options.
    Parameters:
      `secret` - A string containing the ONE user:password tuple. Can be null
      `endpoint` - Where the rpc server is listening, must be something like "http://localhost:2633/RPC2". Can be null
    Throws:
      `ClientConfigurationException` - if the configuration options are invalid

- ## Method Details

  - ### call

    public OneResponse call(String action, Object... args)
    Performs an XML-RPC call.
    Parameters:
      `action` - ONE action
      `args` - ONE arguments
    Returns:
      The server's xml-rpc response encapsulated

  - ### get_version

    public OneResponse get_version()
    Calls OpenNebula and retrieves oned version
    Returns:
      The server's xml-rpc response encapsulated