public abstract class CommonAutoDeployer extends Object implements ApplicationListener<ContextRefreshedEvent>, ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationContext |
applicationContext |
protected CommonAutoDeploymentProperties |
deploymentProperties |
protected Collection<Resource> |
deploymentResources |
| Constructor and Description |
|---|
CommonAutoDeployer(Collection<Resource> deploymentResources) |
CommonAutoDeployer(Collection<Resource> deploymentResources,
CommonAutoDeploymentProperties deploymentProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
deployResources() |
protected abstract void |
deployResourcesInternal(Collection<Resource> resources)
Methods that should be implemented by sub classes to perform the actual deployment.
|
protected String |
determineLockName(String deploymentNameHint) |
protected String |
determineResourceName(Resource resource)
Determines the name to be used for the provided resource.
|
Duration |
getDeploymentLockWaitTime() |
CommonAutoDeploymentProperties |
getDeploymentProperties() |
protected abstract LockManager |
getLockManager()
Get the lock manager for the current deployer.
|
String |
getLockName() |
boolean |
isThrowExceptionOnDeploymentFailure() |
boolean |
isUseLockForDeployments() |
void |
onApplicationEvent(ContextRefreshedEvent event) |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforPayloadprotected CommonAutoDeploymentProperties deploymentProperties
protected final Collection<Resource> deploymentResources
protected ApplicationContext applicationContext
public CommonAutoDeployer(Collection<Resource> deploymentResources)
public CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties)
public void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void deployResources()
protected abstract void deployResourcesInternal(Collection<Resource> resources)
resources - the resources to be deployedprotected abstract LockManager getLockManager()
protected String determineResourceName(Resource resource)
resource - the resource to get the name forpublic CommonAutoDeploymentProperties getDeploymentProperties()
public void setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
public boolean isUseLockForDeployments()
public Duration getDeploymentLockWaitTime()
public boolean isThrowExceptionOnDeploymentFailure()
public String getLockName()