net.java.dev.vcc.spi
Class AbstractDatacenter

java.lang.Object
  extended by net.java.dev.vcc.spi.AbstractManagedObject<Datacenter>
      extended by net.java.dev.vcc.spi.AbstractDatacenter
All Implemented Interfaces:
CapabilityProfile, Datacenter, ManagedObject<Datacenter>

public abstract class AbstractDatacenter
extends AbstractManagedObject<Datacenter>
implements Datacenter

The base class from which all Service Provider Implementations map a connection from.


Constructor Summary
AbstractDatacenter(LogFactory logFactory, ManagedObjectId<Datacenter> id, boolean ignore, CapabilityProfile... bases)
           
AbstractDatacenter(LogFactory logFactory, ManagedObjectId<Datacenter> id, CapabilityProfile base, java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>>... capabilities)
           
AbstractDatacenter(LogFactory logFactory, ManagedObjectId<Datacenter> id, java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>>... capabilities)
           
 
Method Summary
 java.util.Set<Computer> getAllComputers()
          Gets all the virtual computers that are contained in this container including children.
 java.util.Set<ComputerTemplate> getAllComputerTemplates()
          Gets all the computer templates that are contained in this container including children.
 java.util.Set<DatacenterResourceGroup> getAllDatacenterResourceGroups()
          Gets all the DatacenterResourceGroups that are contained in this container including children.
 java.util.Set<HostResourceGroup> getAllHostResourceGroups()
          Gets all the HostResourceGroups that are contained in this container including children.
 java.util.Set<Host> getAllHosts()
          Gets all the hosts available for running virtual computers that are contained in this container including children.
 java.util.Set<java.lang.Class<? extends Command>> getCommands(java.lang.Class<? extends ManagedObject> managedObjectClass)
          Returns the types of Command that are supported against a specific type of ManagedObject.
 java.util.Set<ComputerTemplate> getComputerTemplates()
          Gets all the computer templates that are contained in this container.
 java.util.Set<DatacenterResourceGroup> getDatacenterResourceGroups()
          Gets alll the DatacenterResourceGroups that are contained in this container.
 java.util.Set<Host> getHosts()
          Gets all the hosts available for running virtual computers that are contained in this container.
 Log getLog()
           
 java.util.Set<java.lang.Class<? extends ManagedObject>> getObjectClasses()
          Returns the types of ManagedObject that are available.
 boolean supports(CapabilityProfile that)
          Returns true if this CapabilityProfile supports a superset of the supplied CapabilityProfile.
protected static java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>> with(java.lang.Class<? extends ManagedObject> object, java.lang.Class<? extends Command>... commands)
          Helper method.
 
Methods inherited from class net.java.dev.vcc.spi.AbstractManagedObject
equals, getDescription, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.dev.vcc.api.Datacenter
close, getAllowedStates, getAllowedStates, isOpen
 
Methods inherited from interface net.java.dev.vcc.api.ManagedObject
execute, getCommands, getDescription, getId, getName
 

Constructor Detail

AbstractDatacenter

public AbstractDatacenter(LogFactory logFactory,
                          ManagedObjectId<Datacenter> id,
                          java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>>... capabilities)

AbstractDatacenter

public AbstractDatacenter(LogFactory logFactory,
                          ManagedObjectId<Datacenter> id,
                          CapabilityProfile base,
                          java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>>... capabilities)

AbstractDatacenter

public AbstractDatacenter(LogFactory logFactory,
                          ManagedObjectId<Datacenter> id,
                          boolean ignore,
                          CapabilityProfile... bases)
Method Detail

getLog

public final Log getLog()

with

protected static java.util.Map.Entry<java.lang.Class<? extends ManagedObject>,java.util.Set<java.lang.Class<? extends Command>>> with(java.lang.Class<? extends ManagedObject> object,
                                                                                                                                      java.lang.Class<? extends Command>... commands)
Helper method.

Parameters:
object - The type of ManagedObject
commands - The types of Commands supported on the ManagedObject.
Returns:
An Map.Entry for use in the constructor.

getComputerTemplates

public java.util.Set<ComputerTemplate> getComputerTemplates()
Gets all the computer templates that are contained in this container.

Returns:
the computer templates that are contained in this container.

getHosts

public java.util.Set<Host> getHosts()
Gets all the hosts available for running virtual computers that are contained in this container.

Returns:
the hosts available for running virtual computers that are contained in this container.

getDatacenterResourceGroups

public java.util.Set<DatacenterResourceGroup> getDatacenterResourceGroups()
Gets alll the DatacenterResourceGroups that are contained in this container.

Returns:
the DatacenterResourceGroups that are contained in this container.

getAllHosts

public java.util.Set<Host> getAllHosts()
Gets all the hosts available for running virtual computers that are contained in this container including children.

Returns:
the hosts available for running virtual computers that are contained in this container including children.

getAllComputerTemplates

public java.util.Set<ComputerTemplate> getAllComputerTemplates()
Gets all the computer templates that are contained in this container including children.

Returns:
the computer templates that are contained in this container including children.

getAllComputers

public java.util.Set<Computer> getAllComputers()
Gets all the virtual computers that are contained in this container including children.

Returns:
the virtual computers that are contained in this container including children.

getAllDatacenterResourceGroups

public java.util.Set<DatacenterResourceGroup> getAllDatacenterResourceGroups()
Gets all the DatacenterResourceGroups that are contained in this container including children.

Returns:
the DatacenterResourceGroups that are contained in this container including children.

getAllHostResourceGroups

public java.util.Set<HostResourceGroup> getAllHostResourceGroups()
Gets all the HostResourceGroups that are contained in this container including children.

Returns:
the HostResourceGroups that are contained in this container including children.

getCommands

public final java.util.Set<java.lang.Class<? extends Command>> getCommands(java.lang.Class<? extends ManagedObject> managedObjectClass)
Returns the types of Command that are supported against a specific type of ManagedObject.

Specified by:
getCommands in interface CapabilityProfile
Parameters:
managedObjectClass - The type of ManagedObject.
Returns:
The types of Command that are supported on the ManagedObject

getObjectClasses

public final java.util.Set<java.lang.Class<? extends ManagedObject>> getObjectClasses()
Returns the types of ManagedObject that are available.

Specified by:
getObjectClasses in interface CapabilityProfile
Returns:
the types of ManagedObject that are available.

supports

public final boolean supports(CapabilityProfile that)
Returns true if this CapabilityProfile supports a superset of the supplied CapabilityProfile.

Specified by:
supports in interface CapabilityProfile
Parameters:
that - The CapabilityProfile which might be a subset of this.
Returns:
true if this CapabilityProfile supports a superset of the supplied CapabilityProfile.


Copyright © 2009. All Rights Reserved.