org.ow2.petals.jbi.management.task.deployment.undeploy
Class UndeployAllSUsTask

java.lang.Object
  extended by org.ow2.petals.jbi.management.task.AbstractLoggableTask
      extended by org.ow2.petals.jbi.management.task.deployment.undeploy.UndeployAllSUsTask
All Implemented Interfaces:
Task

public class UndeployAllSUsTask
extends AbstractLoggableTask

This task executes the undeployment process of a service unit, for each Service Unit included into the service assembly
Inputs : ServiceAssemblyLifeCycle, XMLResult
The task has got a mixed approach: it tries to do all the subtasks
and doesn't have the undo capability. But if the service assembly isn't over shutdown or unknown state,
to implement the JBI specification, it stops and thrown an exception to launch the undo process

Author:
ofabre - EBM Websourcing, Frederic Gardes - eBM Websourcing

Field Summary
protected  AdminService adminService
          JBI Container :: JMX Agent Admin
 
Fields inherited from class org.ow2.petals.jbi.management.task.AbstractLoggableTask
log
 
Constructor Summary
UndeployAllSUsTask(org.ow2.petals.util.LoggingUtil log, AdminService managerService)
           
 
Method Summary
 void execute(Context context)
          Launch the task with the given context.
protected  java.lang.String undeploySU(ServiceUnitLifeCycle suLifeCycle)
          Process the undeployment of the given service unit.
protected  void undeploySUS(ServiceAssemblyLifeCycle saLifeCycle, XMLResult xmlResult)
          Undeploy all SUs by calling the "undeploySU" method of the corresponding SUDeploymentManager.
 void undo(Context context)
          Reverse the task in order to retrieve the environ state before execution of this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adminService

protected AdminService adminService
JBI Container :: JMX Agent Admin

Constructor Detail

UndeployAllSUsTask

public UndeployAllSUsTask(org.ow2.petals.util.LoggingUtil log,
                          AdminService managerService)
Method Detail

execute

public void execute(Context context)
             throws java.lang.Exception
Description copied from interface: Task
Launch the task with the given context. Task can modify information included in this context during execution.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task processing

undeploySUS

protected void undeploySUS(ServiceAssemblyLifeCycle saLifeCycle,
                           XMLResult xmlResult)
                    throws javax.jbi.JBIException
Undeploy all SUs by calling the "undeploySU" method of the corresponding SUDeploymentManager.

Parameters:
saLifeCycle - the parent ServiceAssemblyLifeCycle
xmlResult - xml task result
Throws:
java.lang.Exception - if an error occurs during the undeployment of a service unit
javax.jbi.JBIException

undeploySU

protected java.lang.String undeploySU(ServiceUnitLifeCycle suLifeCycle)
Process the undeployment of the given service unit.

Parameters:
suLifeCycle - the service unit life cycle
Throws:
java.lang.Exception - if an error occurs during the undeployment process : can't retrieve the ComponentLifeCycle, can't retrieve the component ServiceUnitManager (SUM) or an exception is thrown during the call of the undeploy method of the SUM

undo

public void undo(Context context)
          throws java.lang.Exception
Description copied from interface: Task
Reverse the task in order to retrieve the environ state before execution of this task.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task unprocessing


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.