public class LocationCustomizerDelegate extends java.lang.Object implements JcloudsLocationCustomizer
| Modifier and Type | Method and Description | 
|---|---|
void | 
customize(JcloudsLocation location,
         org.jclouds.compute.ComputeService computeService,
         JcloudsMachineLocation machineLocation)
Override to configure the given machine once it has been created and started by Jclouds. 
 | 
void | 
customize(JcloudsLocation location,
         org.jclouds.compute.ComputeService computeService,
         org.jclouds.compute.domain.Template template)
Override to configure a subclass of this with the built template, or to configure the built
 template's  
TemplateOptions. | 
void | 
customize(JcloudsLocation location,
         org.jclouds.compute.ComputeService computeService,
         org.jclouds.compute.domain.TemplateBuilder templateBuilder)
Override to configure  
templateBuilder
 before it is built and immutable. | 
void | 
customize(JcloudsLocation location,
         org.jclouds.compute.ComputeService computeService,
         org.jclouds.compute.options.TemplateOptions templateOptions)
Override to configure the  
TemplateOptions that will
 be used by JcloudsLocation to obtain machines. | 
void | 
customize(JcloudsLocation location,
         org.jclouds.compute.domain.NodeMetadata node,
         ConfigBag setup)
Override to configure the  
NodeMetadata, and ConfigBag that will be used when
 connecting to the machine. | 
static java.util.Collection<JcloudsLocationCustomizer> | 
getCustomizers(ManagementContext mgmt,
              ConfigBag setup)  | 
static JcloudsLocationCustomizer | 
newInstance(java.util.Collection<JcloudsLocationCustomizer> customizers)
Deprecated. 
 
since 0.11.0. Use  
newInstance(ManagementContext, ConfigBag) instead. | 
static JcloudsLocationCustomizer | 
newInstance(ManagementContext managementContext,
           ConfigBag setup)  | 
void | 
postRelease(JcloudsMachineLocation machine)
Override to handle machine-related cleanup after Jclouds is called to release (destroy) the machine. 
 | 
void | 
postReleaseOnObtainError(JcloudsLocation location,
                        JcloudsMachineLocation machineLocation,
                        java.lang.Exception cause)
 Override to handle cleanup after failure to obtain a machine. 
 | 
void | 
preRelease(JcloudsMachineLocation machine)
Override to handle machine-related cleanup before Jclouds is called to release (destroy) the machine. 
 | 
void | 
preReleaseOnObtainError(JcloudsLocation location,
                       JcloudsMachineLocation machineLocation,
                       java.lang.Exception cause)
Override to handle cleanup after failure to obtain a machine. 
 | 
public static JcloudsLocationCustomizer newInstance(ManagementContext managementContext, ConfigBag setup)
@Deprecated public static JcloudsLocationCustomizer newInstance(java.util.Collection<JcloudsLocationCustomizer> customizers)
newInstance(ManagementContext, ConfigBag) instead.public void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.TemplateBuilder templateBuilder)
JcloudsLocationCustomizertemplateBuilder
 before it is built and immutable.customize in interface JcloudsLocationCustomizerpublic void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.Template template)
JcloudsLocationCustomizerTemplateOptions.
 
 This method will be called before JcloudsLocationCustomizer.customize(JcloudsLocation, ComputeService, TemplateOptions).
customize in interface JcloudsLocationCustomizerpublic void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.options.TemplateOptions templateOptions)
JcloudsLocationCustomizerTemplateOptions that will
 be used by JcloudsLocation to obtain machines.customize in interface JcloudsLocationCustomizerpublic void customize(JcloudsLocation location, org.jclouds.compute.domain.NodeMetadata node, ConfigBag setup)
JcloudsLocationCustomizerNodeMetadata, and ConfigBag that will be used when
 connecting to the machine.customize in interface JcloudsLocationCustomizerpublic void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, JcloudsMachineLocation machineLocation)
JcloudsLocationCustomizer
 If CloudLocationConfig.WAIT_FOR_SSHABLE is true the machine is guaranteed to be
 SSHable when this method is called.
customize in interface JcloudsLocationCustomizerpublic void preRelease(JcloudsMachineLocation machine)
JcloudsLocationCustomizerpreRelease in interface JcloudsLocationCustomizerpublic void postRelease(JcloudsMachineLocation machine)
JcloudsLocationCustomizerpostRelease in interface JcloudsLocationCustomizerpublic void preReleaseOnObtainError(JcloudsLocation location, JcloudsMachineLocation machineLocation, java.lang.Exception cause)
JcloudsLocationCustomizerInterruptedException
 in which case return as quickly as possible.preReleaseOnObtainError in interface JcloudsLocationCustomizerpublic void postReleaseOnObtainError(JcloudsLocation location, JcloudsMachineLocation machineLocation, java.lang.Exception cause)
JcloudsLocationCustomizer
 Override to handle cleanup after failure to obtain a machine. Called after releasing the locations' underlying node.
 Could be called as a result of an InterruptedException in which case return as quickly as possible.
 
 Will be skipped if CloudLocationConfig.DESTROY_ON_FAILURE is set to false.
postReleaseOnObtainError in interface JcloudsLocationCustomizerpublic static java.util.Collection<JcloudsLocationCustomizer> getCustomizers(ManagementContext mgmt, ConfigBag setup)