org.glassfish.virtualization.spi
Interface TemplateCustomizer


@Contract
public interface TemplateCustomizer

A template customizer is responsible for customizing a virtual machine for a particular template service type.


Method Summary
 void clean(VirtualMachine virtualMachine)
          Clean the current virtual machine information from this process's configuration, this step will be called once before the virtual machine is undefined.
 void customize(VirtualCluster cluster, VirtualMachine virtualMachine)
          Customize the template instance running within the passed VirtualMachine instance for a particular use (like a GlassFish instance, or a database).
 void start(VirtualMachine virtualMachine, boolean firstStart)
          Starts the template instance services.
 void stop(VirtualMachine virtualMachine)
          Stop the template instance services
 

Method Detail

customize

void customize(VirtualCluster cluster,
               VirtualMachine virtualMachine)
               throws VirtException
Customize the template instance running within the passed VirtualMachine instance for a particular use (like a GlassFish instance, or a database). This step will be performed once when the virtual machine is allocated.

Parameters:
cluster - the virtual cluster runtime information
virtualMachine - the instantiated template's virtual machine
Throws:
VirtException - if the customization cannot be achieved

start

void start(VirtualMachine virtualMachine,
           boolean firstStart)
Starts the template instance services.

Parameters:
virtualMachine - the virtual machine containing the instantiated template.
firstStart - set to true if we are starting the virtual machine for the first time

stop

void stop(VirtualMachine virtualMachine)
Stop the template instance services

Parameters:
virtualMachine - the virtual machine containing the running services

clean

void clean(VirtualMachine virtualMachine)
Clean the current virtual machine information from this process's configuration, this step will be called once before the virtual machine is undefined.

Parameters:
virtualMachine - the virtual machine instance to remove from our configuration.


Copyright © 2012. All Rights Reserved.