net.java.dev.vcc.api
Class DatacenterManager

java.lang.Object
  extended by net.java.dev.vcc.api.DatacenterManager

public final class DatacenterManager
extends java.lang.Object

The connection factory creates connections with which to control Virtual Computers and their Hosts.


Method Summary
static Datacenter getConnection(java.lang.ClassLoader classLoader, java.lang.String url, java.lang.String username, char[] password)
          Gets a connection.
static Datacenter getConnection(java.lang.String url, java.lang.String username, char[] password)
          Gets a connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public static Datacenter getConnection(java.lang.String url,
                                       java.lang.String username,
                                       char[] password)
                                throws java.io.IOException
Gets a connection.

Parameters:
url - The URL of the connection to get.
username - The username to authenticate with (may be null if the DatacenterConnection does not require quthenticaction.
password - The password to authenticate with (may be null if the DatacenterConnection does not require quthenticaction. (Note a char array is used in order to prevent the String of the password getting Interned. The char array can be overwritten once it has been used to prevent memory probes from sniffing the password in clear text)
Returns:
The connection.
Throws:
java.lang.RuntimeException - until we get our own exception for when we cannot get a connection.
java.io.IOException

getConnection

public static Datacenter getConnection(java.lang.ClassLoader classLoader,
                                       java.lang.String url,
                                       java.lang.String username,
                                       char[] password)
                                throws java.io.IOException
Gets a connection.

Parameters:
classLoader - The classloader to search for implementations from.
url - The URL of the connection to get.
username - The username to authenticate with (may be null if the DatacenterConnection does not require quthenticaction.
password - The password to authenticate with (may be null if the DatacenterConnection does not require quthenticaction. (Note a char array is used in order to prevent the String of the password getting Interned. The char array can be overwritten once it has been used to prevent memory probes from sniffing the password in clear text)
Returns:
The connection.
Throws:
java.lang.RuntimeException - until we get our own exception for when we cannot get a connection.
java.io.IOException


Copyright © 2009. All Rights Reserved.