public abstract class AbstractSynapseArtifactDeployer
extends org.apache.axis2.deployment.AbstractDeployer
Any synapse artifact which requires the hot deployment or hot update features should extend this and just needs to concentrate on the deployment logic. By default setting the file extension and directory dynamically is not supported.
Deployer
Modifier and Type | Field and Description |
---|---|
protected org.apache.axis2.context.ConfigurationContext |
cfgCtx |
protected java.lang.String |
customLogContent |
protected org.apache.commons.logging.Log |
deployerLog |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSynapseArtifactDeployer() |
Modifier and Type | Method and Description |
---|---|
void |
deploy(org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData)
This method is called by the axis2 deployment framework and it performs a synapse artifact
specific yet common across all the artifacts, set of tasks and delegate the actual deployment
to the respective artifact deployers.
|
abstract java.lang.String |
deploySynapseArtifact(org.apache.axiom.om.OMElement artifactConfig,
java.lang.String fileName,
java.util.Properties properties)
All synapse artifact deployers MUST implement this method and it handles artifact specific
deployment tasks of those artifacts.
|
protected void |
executeExtendedSynapseHandlerOnArtifactDeployment(java.lang.String artifactName,
java.lang.String artifactType,
java.lang.String startTime)
Execute the ExtendedSynapseHandler during the artifact deployment.
|
protected void |
executeSynapseHandlerOnArtifactUnDeployment(java.lang.String artifactName,
java.lang.String artifactType,
java.lang.String unDeployTime)
Execute the ExtendedSynapseHandler during the artifact undeployment.
|
protected ServerConfigurationInformation |
getServerConfigurationInformation() |
protected ServerContextInformation |
getServerContextInformation() |
protected SynapseConfiguration |
getSynapseConfiguration() |
protected SynapseEnvironment |
getSynapseEnvironment() |
protected void |
handleSynapseArtifactDeploymentError(java.lang.String msg) |
protected void |
handleSynapseArtifactDeploymentError(java.lang.String msg,
java.lang.Exception e) |
void |
init(org.apache.axis2.context.ConfigurationContext configCtx)
Initializes the Synapse artifact deployment
|
abstract void |
restoreSynapseArtifact(java.lang.String artifactName)
All synapse artifact deployers MUST implement this method and it handles artifact specific
restore tasks of those artifacts upon a failure of an update or undeployment.
|
void |
setCustomLog(java.lang.String artifactContainerName,
java.lang.String tenantId) |
void |
setDirectory(java.lang.String directory) |
void |
setExtension(java.lang.String extension) |
void |
undeploy(java.lang.String fileName)
This is the method called by the axis2 framework for undeployment of the artifacts.
|
abstract void |
undeploySynapseArtifact(java.lang.String artifactName)
All synapse artifact deployers MUST implement this method and it handles artifact specific
undeployment tasks of those artifacts.
|
abstract java.lang.String |
updateSynapseArtifact(org.apache.axiom.om.OMElement artifactConfig,
java.lang.String fileName,
java.lang.String existingArtifactName,
java.util.Properties properties)
All synapse artifact deployers MUST implement this method and it handles artifact specific
update tasks of those artifacts.
|
protected void |
waitForCompletion() |
protected void |
writeToFile(org.apache.axiom.om.OMElement content,
java.lang.String fileName) |
protected org.apache.commons.logging.Log deployerLog
protected org.apache.axis2.context.ConfigurationContext cfgCtx
protected java.lang.String customLogContent
public void init(org.apache.axis2.context.ConfigurationContext configCtx)
configCtx
- Axis2 ConfigurationContextpublic void deploy(org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData) throws org.apache.axis2.deployment.DeploymentException
deploy
in interface org.apache.axis2.deployment.Deployer
deploy
in class org.apache.axis2.deployment.AbstractDeployer
deploymentFileData
- file to be used for the deploymentorg.apache.axis2.deployment.DeploymentException
- in-case of an error in deploying the filedeploySynapseArtifact(org.apache.axiom.om.OMElement,
String,java.util.Properties)
public void undeploy(java.lang.String fileName) throws org.apache.axis2.deployment.DeploymentException
undeploy
in interface org.apache.axis2.deployment.Deployer
undeploy
in class org.apache.axis2.deployment.AbstractDeployer
fileName
- file describing the artifact to be undeployedorg.apache.axis2.deployment.DeploymentException
- in case of an error in undeploymentundeploySynapseArtifact(
String)
public void setDirectory(java.lang.String directory)
public void setExtension(java.lang.String extension)
public abstract java.lang.String deploySynapseArtifact(org.apache.axiom.om.OMElement artifactConfig, java.lang.String fileName, java.util.Properties properties)
artifactConfig
- built element representing the artifact to be deployed loaded
from the filefileName
- file name from which this artifact is being loadedproperties
- Properties associated with the artifactdeploy(
org.apache.axis2.deployment.repository.util.DeploymentFileData)
public abstract java.lang.String updateSynapseArtifact(org.apache.axiom.om.OMElement artifactConfig, java.lang.String fileName, java.lang.String existingArtifactName, java.util.Properties properties)
artifactConfig
- built element representing the artifact to be deployed loaded
from the filefileName
- file name from which this artifact is being loadedexistingArtifactName
- name of the artifact that was being deployed using
the updated fileproperties
- bag of properties with the additional informationpublic abstract void undeploySynapseArtifact(java.lang.String artifactName)
artifactName
- name of the artifact to be undeployedundeploy(String)
public abstract void restoreSynapseArtifact(java.lang.String artifactName)
artifactName
- name of the artifact to be restoredprotected SynapseConfiguration getSynapseConfiguration() throws org.apache.axis2.deployment.DeploymentException
org.apache.axis2.deployment.DeploymentException
protected SynapseEnvironment getSynapseEnvironment() throws org.apache.axis2.deployment.DeploymentException
org.apache.axis2.deployment.DeploymentException
protected ServerConfigurationInformation getServerConfigurationInformation() throws org.apache.axis2.deployment.DeploymentException
org.apache.axis2.deployment.DeploymentException
protected ServerContextInformation getServerContextInformation() throws org.apache.axis2.deployment.DeploymentException
org.apache.axis2.deployment.DeploymentException
protected void writeToFile(org.apache.axiom.om.OMElement content, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
protected void waitForCompletion()
protected void handleSynapseArtifactDeploymentError(java.lang.String msg)
protected void handleSynapseArtifactDeploymentError(java.lang.String msg, java.lang.Exception e)
public void setCustomLog(java.lang.String artifactContainerName, java.lang.String tenantId)
protected void executeExtendedSynapseHandlerOnArtifactDeployment(java.lang.String artifactName, java.lang.String artifactType, java.lang.String startTime) throws org.apache.axis2.deployment.DeploymentException
artifactName
- name of the deployed artifactartifactType
- type of the deployed artifactstartTime
- time the artifact was deployedorg.apache.axis2.deployment.DeploymentException
protected void executeSynapseHandlerOnArtifactUnDeployment(java.lang.String artifactName, java.lang.String artifactType, java.lang.String unDeployTime) throws org.apache.axis2.deployment.DeploymentException
artifactName
- name of the undeployed artifactartifactType
- type of the undeployed artifactunDeployTime
- time the artifact was undeployedorg.apache.axis2.deployment.DeploymentException
Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.