|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.application.deployer.internal.ApplicationManager
public final class ApplicationManager
Manages all cApp deployment aspects. Carbon App deployment is done in two steps. A cApp is basically a p2 repo which contains artifacts as features. Step 1 : Find out the artifacts to be installed in this server and install their features through p2 Step 2 : After needed features are installed, complete the cApp deployment by sending the cApp through a chain of handlers This handler chain can contain different cApp artifact deployers. Those can be registered or unregistered using this ApplicationManager API.
| Method Summary | |
|---|---|
void |
addCarbonApp(String tenantId,
CarbonApplication carbonApp)
Add a new cApp for a particular tenant. |
void |
addFaultyCarbonApp(String tenantId,
String carbonApp,
Exception error)
Add a new faulty cApp for a particular tenant. |
Artifact |
buildAppArtifact(CarbonApplication parentApp,
InputStream artifactXmlStream)
Builds the artifact from the given input steam and adds it as a dependency in the provided parent carbon application. |
void |
buildDependencyTree(Artifact rootArtifact,
List<Artifact> allArtifacts)
If the given artifact is a dependent artifact for the rootArtifact, include it as the actual dependency. |
void |
cleanupCarbonApps(org.apache.axis2.engine.AxisConfiguration axisConfig)
|
void |
deployCarbonApp(String archPath,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Deploy a single app by iterating all handlers and sending apps through the handler chain.. |
ArrayList<CarbonApplication> |
getCarbonApps(String tenantId)
Get the list of CarbonApplications for the give tenant id. |
HashMap<String,Exception> |
getFaultyCarbonApps(String tenantId)
Get the list of faulty CarbonApplications for the give tenant id. |
static ApplicationManager |
getInstance()
ApplicationManager is singleton. |
CarbonAppPersistenceManager |
getPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig)
Retuns the persistence manger for the given axis config (tenant). |
void |
init()
|
void |
registerDeploymentHandler(AppDeploymentHandler handler)
All app deployers register their deployers throgh this method |
void |
removeCarbonApp(String tenantId,
CarbonApplication carbonApp)
Remove a cApp for a particular tenant |
void |
removeFaultyCarbonApp(String tenantId,
String appFilePath)
Remove a faulty cApp for a particular tenant |
void |
undeployCarbonApp(CarbonApplication carbonApp,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Undeploy the provided carbon App by sending it through the registered undeployment handler chain.. |
void |
unregisterDeploymentHandler(AppDeploymentHandler handler)
Unregister the specified handler if it is already regitered |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void init()
public static ApplicationManager getInstance()
public void registerDeploymentHandler(AppDeploymentHandler handler)
registerDeploymentHandler in interface ApplicationManagerServicehandler - - app deployer which implements the AppDeploymentHandler interfacepublic void unregisterDeploymentHandler(AppDeploymentHandler handler)
unregisterDeploymentHandler in interface ApplicationManagerServicehandler - - input deployer handler
public void deployCarbonApp(String archPath,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws Exception
deployCarbonApp in interface ApplicationManagerServicearchPath - - carbon app archive pathaxisConfig - - AxisConfiguration of the current tenant
Exception - - error on registry actions
public Artifact buildAppArtifact(CarbonApplication parentApp,
InputStream artifactXmlStream)
throws org.wso2.carbon.CarbonException
parentApp - - parent applicationartifactXmlStream - - xml input stream of the artifact.xml
org.wso2.carbon.CarbonException - - error while building
public void undeployCarbonApp(CarbonApplication carbonApp,
org.apache.axis2.engine.AxisConfiguration axisConfig)
undeployCarbonApp in interface ApplicationManagerServicecarbonApp - - CarbonApplication instanceaxisConfig - - AxisConfiguration of the current tenantpublic ArrayList<CarbonApplication> getCarbonApps(String tenantId)
getCarbonApps in interface ApplicationManagerServicetenantId - - tenant id to find cApps
public HashMap<String,Exception> getFaultyCarbonApps(String tenantId)
getFaultyCarbonApps in interface ApplicationManagerServicetenantId - - tenant id to find faulty cApps
public void addFaultyCarbonApp(String tenantId,
String carbonApp,
Exception error)
tenantId - carbonApp -
public void removeFaultyCarbonApp(String tenantId,
String appFilePath)
tenantId - appFilePath -
public void addCarbonApp(String tenantId,
CarbonApplication carbonApp)
tenantId - - tenant id of the cAppcarbonApp - - CarbonApplication instance
public void removeCarbonApp(String tenantId,
CarbonApplication carbonApp)
tenantId - - tenant id of the cAppcarbonApp - - CarbonApplication instance
public void buildDependencyTree(Artifact rootArtifact,
List<Artifact> allArtifacts)
rootArtifact - - root to start searchallArtifacts - - all artifacts found under current cApppublic CarbonAppPersistenceManager getPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig)
axisConfig - - AxisConfiguration of the current tenant
public void cleanupCarbonApps(org.apache.axis2.engine.AxisConfiguration axisConfig)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||