org.camunda.bpm.container.impl.jmx.kernel
Class MBeanDeploymentOperation

java.lang.Object
  extended by org.camunda.bpm.container.impl.jmx.kernel.MBeanDeploymentOperation

public class MBeanDeploymentOperation
extends Object

A DeploymentOperation allows bundling multiple deployment steps into a composite operation that succeeds or fails atomically.

The DeploymentOperation is composed of a list of individual steps ( MBeanDeploymentOperationStep). Each step may or may not install new services into the container. If one of the steps fails, the operation makes sure that

Author:
Daniel Meyer

Nested Class Summary
static class MBeanDeploymentOperation.MBeanDeploymentOperationBuilder
           
 
Field Summary
protected  Map<String,Object> attachments
          a list of attachments allows to pass state from one operation to another
protected  MBeanDeploymentOperationStep currentStep
           
protected  List<ObjectName> installedServices
          the list of services installed by this operation.
protected  boolean isRollbackOnFailure
           
protected  Logger log
           
protected  String name
          the name of this composite operation
protected  MBeanServiceContainer serviceContainer
          the service container
protected  List<MBeanDeploymentOperationStep> steps
          the list of steps that make up this composite operation
protected  List<MBeanDeploymentOperationStep> successfulSteps
          a list of steps that completed successfully
 
Constructor Summary
MBeanDeploymentOperation(String name, MBeanServiceContainer container, List<MBeanDeploymentOperationStep> steps)
           
 
Method Summary
 void addAttachment(String name, Object value)
           
 void addStep(MBeanDeploymentOperationStep step)
          Add a new atomic step to the composite operation.
 void execute()
           
<S> S
getAttachment(String name)
           
 List<ObjectName> getInstalledServices()
           
 MBeanServiceContainer getServiceContainer()
           
protected  void rollbackOperation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected Logger log

name

protected final String name
the name of this composite operation


serviceContainer

protected final MBeanServiceContainer serviceContainer
the service container


steps

protected final List<MBeanDeploymentOperationStep> steps
the list of steps that make up this composite operation


successfulSteps

protected final List<MBeanDeploymentOperationStep> successfulSteps
a list of steps that completed successfully


installedServices

protected List<ObjectName> installedServices
the list of services installed by this operation. The rollbackOperation() must make sure all these services are removed if the operation fails.


attachments

protected Map<String,Object> attachments
a list of attachments allows to pass state from one operation to another


isRollbackOnFailure

protected boolean isRollbackOnFailure

currentStep

protected MBeanDeploymentOperationStep currentStep
Constructor Detail

MBeanDeploymentOperation

public MBeanDeploymentOperation(String name,
                                MBeanServiceContainer container,
                                List<MBeanDeploymentOperationStep> steps)
Method Detail

getAttachment

public <S> S getAttachment(String name)

addAttachment

public void addAttachment(String name,
                          Object value)

addStep

public void addStep(MBeanDeploymentOperationStep step)
Add a new atomic step to the composite operation. If the operation is currently executing a step, the step is added after the current step.


getServiceContainer

public MBeanServiceContainer getServiceContainer()

execute

public void execute()

rollbackOperation

protected void rollbackOperation()

getInstalledServices

public List<ObjectName> getInstalledServices()


Copyright © 2014 camunda services GmbH. All Rights Reserved.