Class CommonAutoDeployer
java.lang.Object
com.flowable.platform.common.deployer.CommonAutoDeployer
- All Implemented Interfaces:
Lifecycle
,Phased
,SmartLifecycle
- Direct Known Subclasses:
DefaultAppAutoDeployer
,DefaultCaseDefinitionAutoDeployer
,DefaultDmnDefinitionAutoDeployer
,DefaultDocumentDefinitionAutoDeployer
,DefaultEventRegistryDefinitionAutoDeployer
,DefaultFormDefinitionAutoDeployer
,DefaultProcessDefinitionAutoDeployer
- Author:
- Filip Hrisafov
-
Field Summary
Modifier and TypeFieldDescriptionprotected CommonAutoDeploymentProperties
protected final Collection<Resource>
protected final Object
protected final org.slf4j.Logger
protected boolean
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescriptionCommonAutoDeployer
(Collection<Resource> deploymentResources) CommonAutoDeployer
(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.protected abstract LockManager
Get the lock manager for the current deployer.abstract int
getPhase()
boolean
boolean
boolean
void
setDeploymentProperties
(CommonAutoDeploymentProperties deploymentProperties) void
start()
void
stop()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
deploymentProperties
-
deploymentResources
-
lifeCycleMonitor
-
running
protected boolean running
-
-
Constructor Details
-
CommonAutoDeployer
-
CommonAutoDeployer
public CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties)
-
-
Method Details
-
start
public void start() -
stop
public void stop() -
isRunning
public boolean isRunning() -
getPhase
public abstract int getPhase()- Specified by:
getPhase
in interfacePhased
- Specified by:
getPhase
in interfaceSmartLifecycle
-
deployResources
public void deployResources() -
deployResourcesInternal
Methods that should be implemented by sub classes to perform the actual deployment. If use lock for deployments is used than this methods is called with an already acquired lock.- Parameters:
resources
- the resources to be deployed
-
getLockManager
Get the lock manager for the current deployer. Used when the strategy has been configured to use lock for deployments.- Returns:
- the lock manager
-
determineLockName
-
determineResourceName
Determines the name to be used for the provided resource.- Parameters:
resource
- the resource to get the name for- Returns:
- the name of the resource
-
getDeploymentProperties
-
setDeploymentProperties
-
isUseLockForDeployments
public boolean isUseLockForDeployments() -
getDeploymentLockWaitTime
-
isThrowExceptionOnDeploymentFailure
public boolean isThrowExceptionOnDeploymentFailure() -
getLockName
-