com.xensource.xenapi
Class Console

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

public class Console
extends Object

A console


Nested Class Summary
static class Console.Record
          Represents all the fields in a Console
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
 void addToOtherConfig(String key, String value)
          Add the given key-value pair to the other_config field of the given console.
static Console create(Console.Record record)
          Create a new console instance, and return its handle.
 void destroy()
          Destroy the specified console instance.
static Set<Console> getAll()
          Return a list of all the consoles known to the system.
static Map<Console,Console.Record> getAllRecords()
          Get all the Console Records at once, in a single XML RPC call
static Console getByUuid(String uuid)
          Get a reference to the console instance with the specified UUID.
protected static Console getInstFromRef(String ref)
           
 String getLocation()
          Get the location field of the given console.
 Map<String,String> getOtherConfig()
          Get the other_config field of the given console.
 com.xensource.xenapi.Types.ConsoleProtocol getProtocol()
          Get the protocol field of the given console.
 Console.Record getRecord()
          Get a record containing the current state of the given console.
 String getUuid()
          Get the uuid field of the given console.
 VM getVM()
          Get the VM field of the given console.
 void removeFromOtherConfig(String key)
          Remove the given key and its corresponding value from the other_config field of the given console.
 void setOtherConfig(Map<String,String> otherConfig)
          Set the other_config field of the given console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final String ref
The XenAPI reference to this object.

Method Detail

getInstFromRef

protected static Console getInstFromRef(String ref)

getRecord

public Console.Record getRecord()
                         throws Types.BadServerResponse,
                                ConnectionHelper.NoConnectionOnThisThreadException,
                                XmlRpcException
Get a record containing the current state of the given console.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getByUuid

public static Console getByUuid(String uuid)
                         throws Types.BadServerResponse,
                                ConnectionHelper.NoConnectionOnThisThreadException,
                                XmlRpcException
Get a reference to the console instance with the specified UUID.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

create

public static Console create(Console.Record record)
                      throws Types.BadServerResponse,
                             ConnectionHelper.NoConnectionOnThisThreadException,
                             XmlRpcException
Create a new console instance, and return its handle.

Parameters:
record - All constructor arguments
Returns:
reference to the newly created object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

destroy

public void destroy()
             throws Types.BadServerResponse,
                    ConnectionHelper.NoConnectionOnThisThreadException,
                    XmlRpcException
Destroy the specified console instance.

Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getUuid

public String getUuid()
               throws Types.BadServerResponse,
                      ConnectionHelper.NoConnectionOnThisThreadException,
                      XmlRpcException
Get the uuid field of the given console.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getProtocol

public com.xensource.xenapi.Types.ConsoleProtocol getProtocol()
                                                       throws Types.BadServerResponse,
                                                              ConnectionHelper.NoConnectionOnThisThreadException,
                                                              XmlRpcException
Get the protocol field of the given console.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getLocation

public String getLocation()
                   throws Types.BadServerResponse,
                          ConnectionHelper.NoConnectionOnThisThreadException,
                          XmlRpcException
Get the location field of the given console.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getVM

public VM getVM()
         throws Types.BadServerResponse,
                ConnectionHelper.NoConnectionOnThisThreadException,
                XmlRpcException
Get the VM field of the given console.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getOtherConfig

public Map<String,String> getOtherConfig()
                                  throws Types.BadServerResponse,
                                         ConnectionHelper.NoConnectionOnThisThreadException,
                                         XmlRpcException
Get the other_config field of the given console.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

setOtherConfig

public void setOtherConfig(Map<String,String> otherConfig)
                    throws Types.BadServerResponse,
                           ConnectionHelper.NoConnectionOnThisThreadException,
                           XmlRpcException
Set the other_config field of the given console.

Parameters:
otherConfig - New value to set
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

addToOtherConfig

public void addToOtherConfig(String key,
                             String value)
                      throws Types.BadServerResponse,
                             ConnectionHelper.NoConnectionOnThisThreadException,
                             XmlRpcException
Add the given key-value pair to the other_config field of the given console.

Parameters:
key - Key to add
value - Value to add
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

removeFromOtherConfig

public void removeFromOtherConfig(String key)
                           throws Types.BadServerResponse,
                                  ConnectionHelper.NoConnectionOnThisThreadException,
                                  XmlRpcException
Remove the given key and its corresponding value from the other_config field of the given console. If the key is not in that Map, then do nothing.

Parameters:
key - Key to remove
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getAll

public static Set<Console> getAll()
                           throws Types.BadServerResponse,
                                  ConnectionHelper.NoConnectionOnThisThreadException,
                                  XmlRpcException
Return a list of all the consoles known to the system.

Returns:
references to all objects
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getAllRecords

public static Map<Console,Console.Record> getAllRecords()
                                                 throws Types.BadServerResponse,
                                                        ConnectionHelper.NoConnectionOnThisThreadException,
                                                        XmlRpcException
Get all the Console Records at once, in a single XML RPC call

Returns:
A map from Console to Console.Record
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException