Class SynapseAppDeployer
java.lang.Object
org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer
- All Implemented Interfaces:
org.wso2.carbon.application.deployer.handler.AppDeploymentHandler
public class SynapseAppDeployer
extends Object
implements org.wso2.carbon.application.deployer.handler.AppDeploymentHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforming the action of importing the given meidation librarybooleandeleteEntry(String ele, org.apache.axis2.engine.AxisConfiguration axisConfig) Remove the local entryvoiddeleteImport(String importQualifiedName, org.apache.axis2.engine.AxisConfiguration axisConfig) Delete the SynapseImport instance with given importQualifiedName in the synapse configurationvoiddeployArtifacts(org.wso2.carbon.application.deployer.CarbonApplication carbonApp, org.apache.axis2.engine.AxisConfiguration axisConfig) Deploy the artifacts which can be deployed through this deployer (endpoints, sequences, proxy service etc.).voiddeployArtifactType(List<org.wso2.carbon.application.deployer.config.Artifact.Dependency> artifacts, org.wso2.carbon.application.deployer.CarbonApplication carbonApp, org.apache.axis2.engine.AxisConfiguration axisConfig) This deploys artifacts when a list of artifacts is providedgetArtifactName(String filePath, org.apache.axis2.engine.AxisConfiguration axisConfig) Get the library artifact nameprotected LockgetLock(org.apache.axis2.engine.AxisConfiguration axisConfig) Acquires the lockprotected org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManagergetMediationPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig) Helper method to get the persistence mangerprotected org.apache.synapse.config.SynapseConfigurationgetSynapseConfiguration(org.apache.axis2.engine.AxisConfiguration axisConfig) Helper method to retrieve the Synapse configuration from the relevant axis configurationvoidsetCustomLogContent(org.apache.axis2.deployment.Deployer deployer, org.wso2.carbon.application.deployer.CarbonApplication carbonApp) Set the custom log content if the per Artifact container logging is enabledvoidundeployArtifacts(org.wso2.carbon.application.deployer.CarbonApplication carbonApplication, org.apache.axis2.engine.AxisConfiguration axisConfig) Un-deploys Synapse artifacts found in this application.booleanupdateStatus(String libQName, String libName, String packageName, String status, org.apache.axis2.engine.AxisConfiguration axisConfig) Performing the action of enabling/disabling the given meidation library
-
Constructor Details
-
SynapseAppDeployer
public SynapseAppDeployer()
-
-
Method Details
-
deployArtifacts
public void deployArtifacts(org.wso2.carbon.application.deployer.CarbonApplication carbonApp, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.deployment.DeploymentException Deploy the artifacts which can be deployed through this deployer (endpoints, sequences, proxy service etc.).- Specified by:
deployArtifactsin interfaceorg.wso2.carbon.application.deployer.handler.AppDeploymentHandler- Parameters:
carbonApp- - CarbonApplication instance to check for artifactsaxisConfig- - AxisConfiguration of the current tenant- Throws:
org.apache.axis2.deployment.DeploymentException
-
undeployArtifacts
public void undeployArtifacts(org.wso2.carbon.application.deployer.CarbonApplication carbonApplication, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.deployment.DeploymentException Un-deploys Synapse artifacts found in this application. Just delete the files from the hot folders. Synapse hot deployer will do the rest..- Specified by:
undeployArtifactsin interfaceorg.wso2.carbon.application.deployer.handler.AppDeploymentHandler- Parameters:
carbonApplication- - CarbonApplication instanceaxisConfig- - AxisConfiguration of the current tenant- Throws:
org.apache.axis2.deployment.DeploymentException
-
getArtifactName
public String getArtifactName(String filePath, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.deployment.DeploymentException Get the library artifact name- Parameters:
axisConfig- AxisConfiguration of the current tenant- Throws:
org.apache.axis2.deployment.DeploymentException- if something goes wrong while deployment
-
getSynapseConfiguration
protected org.apache.synapse.config.SynapseConfiguration getSynapseConfiguration(org.apache.axis2.engine.AxisConfiguration axisConfig) Helper method to retrieve the Synapse configuration from the relevant axis configuration- Parameters:
axisConfig- AxisConfiguration of the current tenant- Returns:
- extracted SynapseConfiguration from the relevant AxisConfiguration
-
updateStatus
public boolean updateStatus(String libQName, String libName, String packageName, String status, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.AxisFault Performing the action of enabling/disabling the given meidation library- Parameters:
libName-packageName-status-axisConfig- AxisConfiguration of the current tenant- Throws:
org.apache.axis2.AxisFault
-
addImport
public void addImport(String libName, String packageName, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.AxisFault Performing the action of importing the given meidation library- Parameters:
libName-packageName-axisConfig- AxisConfiguration of the current tenant- Throws:
org.apache.axis2.AxisFault
-
getMediationPersistenceManager
protected org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager getMediationPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig) Helper method to get the persistence manger- Parameters:
axisConfig- AxisConfiguration of the current tenant- Returns:
- persistence manager for this configuration context
-
deleteEntry
Remove the local entry- Parameters:
ele-axisConfig- AxisConfiguration of the current tenant
-
getLock
Acquires the lock- Parameters:
axisConfig- AxisConfiguration instance- Returns:
- Lock instance
-
deleteImport
public void deleteImport(String importQualifiedName, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.AxisFault Delete the SynapseImport instance with given importQualifiedName in the synapse configuration- Parameters:
importQualifiedName- of the MessageProcessor to be deletedaxisConfig- AxisConfiguration of the current tenant- Throws:
org.apache.axis2.AxisFault- if Message processor does not exist
-
setCustomLogContent
public void setCustomLogContent(org.apache.axis2.deployment.Deployer deployer, org.wso2.carbon.application.deployer.CarbonApplication carbonApp) Set the custom log content if the per Artifact container logging is enabled- Parameters:
deployer- Application DeployercarbonApp- carbon application
-
deployArtifactType
public void deployArtifactType(List<org.wso2.carbon.application.deployer.config.Artifact.Dependency> artifacts, org.wso2.carbon.application.deployer.CarbonApplication carbonApp, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.deployment.DeploymentException This deploys artifacts when a list of artifacts is provided- Parameters:
artifacts- - List of artifacts which should be deployedcarbonApp- - CarbonApplication instance to check for artifactsaxisConfig- - AxisConfiguration of the current tenant- Throws:
org.apache.axis2.deployment.DeploymentException- if some error occurs while deployment
-