org.ow2.jasmine.vmm.api
Interface DomainMXBean

All Superinterfaces:
ManagedResourceMXBean

public interface DomainMXBean
extends ManagedResourceMXBean

Management interface for a domain. A domain is a management unit consisting of subdomains and server pools. Domains are organized in a hierarchical fashion. Domains are named using a directory-like naming scheme. Each domain has a local name within its parent domain (e.g. "ParisDatacenter") and an absolute name (e.g. "/root/paris/ParisDatacenter").

The ObjectName for identifying a DomainMXBean follows the following template:

org.ow2.jasmine.vmm.api:type=Domain,name=<pathname>


Method Summary
 ServerPoolMXBean addServerPool(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributes, java.lang.String driver)
          Add a new ServerPool
 DomainMXBean addSubDomain(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributes)
          Add a subdomain
 void deleteServerPool(ServerPoolMXBean server)
          Delete a ServerPool
 void deleteSubDomain(DomainMXBean domain)
          Delete a Domain
 java.lang.String getAttribute(java.lang.String key)
          Returns an attribute of the domain
 java.lang.String getName()
          Return the symbolic name of the domain
 java.util.List<ServerPoolMXBean> getServerPools()
          Returns a list of the server pools belonging to this domain
 java.util.List<DomainMXBean> getSubDomains()
          Returns a list of the subdomains of this domain
 VirtualMachineMXBean provisionVM(VMConfigSpec vmSpec, java.util.Map<java.lang.String,java.lang.String> constraints, boolean sync)
          Provisions a new virtual machine.
 
Methods inherited from interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean
getObjectName, getPath
 

Method Detail

getName

java.lang.String getName()
Return the symbolic name of the domain

Returns:

getAttribute

java.lang.String getAttribute(java.lang.String key)
Returns an attribute of the domain

Returns:
the name of the attribute requested

provisionVM

VirtualMachineMXBean provisionVM(VMConfigSpec vmSpec,
                                 java.util.Map<java.lang.String,java.lang.String> constraints,
                                 boolean sync)
                                 throws InsufficientResourcesException,
                                        InvalidVMConfigException,
                                        VMMException
Provisions a new virtual machine. The host, server pool (and possibly) subdomain on which the VM will be created will depend on the provisioning policy active for this domain (and its subdomains). Upon successful creation a notification of type NotificationTypes.VM_NEW will be emitted by the HostMXBean on which the VM has been created.

Parameters:
vmSpec - initial configuration of the virtual machine
constraints - contraints on the placement of the VM
sync - if true the call will return once the VM has been created
Returns:
the management interface of the created VM if sync is true, null otherwise
Throws:
InsufficientResourcesException - raised if not enough resources are available to create the VM
InvalidVMConfigException - raised if the VM configuration is invalid
VMMException - raised if any type of runtime fault occurs that is not covered by the previous exceptions

getServerPools

java.util.List<ServerPoolMXBean> getServerPools()
Returns a list of the server pools belonging to this domain

Returns:

getSubDomains

java.util.List<DomainMXBean> getSubDomains()
Returns a list of the subdomains of this domain

Returns:

addSubDomain

DomainMXBean addSubDomain(java.lang.String name,
                          java.util.Map<java.lang.String,java.lang.String> attributes)
                          throws VMMException
Add a subdomain

Parameters:
name - of the new domain
attributes - of the domain
Returns:
domainMXBean the MXBean of the new domain
Throws:
VMMException

addServerPool

ServerPoolMXBean addServerPool(java.lang.String name,
                               java.util.Map<java.lang.String,java.lang.String> attributes,
                               java.lang.String driver)
                               throws VMMException
Add a new ServerPool

Parameters:
name - of the new serverpool
attributes - of the serverpool
driver - of the serverpool
Returns:
ServerPoolMXBean the MXBean of the new serverpool
Throws:
VMMException

deleteServerPool

void deleteServerPool(ServerPoolMXBean server)
                      throws VMMException
Delete a ServerPool

Parameters:
server - is the MBean of the serverpool to delete
Throws:
VMMException

deleteSubDomain

void deleteSubDomain(DomainMXBean domain)
                     throws VMMException
Delete a Domain

Parameters:
domain - is the MBean of the domain to delete
Throws:
VMMException


Copyright © 2011 OW2 Consortium. All Rights Reserved.