|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.deployment.AbstractDeployer org.apache.synapse.deployers.AbstractSynapseArtifactDeployer
public abstract class AbstractSynapseArtifactDeployer
Implements the generic logic for the synapse artifact deployment and provide a deployment framework for the synapse.
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
Field Summary | |
---|---|
protected ConfigurationContext |
cfgCtx
|
protected org.apache.commons.logging.Log |
deployerLog
|
Fields inherited from class org.apache.axis2.deployment.AbstractDeployer |
---|
deploymentFileDataMap |
Constructor Summary | |
---|---|
protected |
AbstractSynapseArtifactDeployer()
|
Method Summary | |
---|---|
void |
deploy(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 String |
deploySynapseArtifact(OMElement artifactConfig,
String fileName,
Properties properties)
All synapse artifact deployers MUST implement this method and it handles artifact specific deployment tasks of those artifacts. |
protected ServerConfigurationInformation |
getServerConfigurationInformation()
|
protected ServerContextInformation |
getServerContextInformation()
|
protected SynapseConfiguration |
getSynapseConfiguration()
|
protected SynapseEnvironment |
getSynapseEnvironment()
|
protected void |
handleSynapseArtifactDeploymentError(String msg)
|
protected void |
handleSynapseArtifactDeploymentError(String msg,
Exception e)
|
void |
init(ConfigurationContext configCtx)
Initializes the Synapse artifact deployment |
abstract void |
restoreSynapseArtifact(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 |
setDirectory(String directory)
|
void |
setExtension(String extension)
|
void |
undeploy(String fileName)
This is the method called by the axis2 framework for undeployment of the artifacts. |
abstract void |
undeploySynapseArtifact(String artifactName)
All synapse artifact deployers MUST implement this method and it handles artifact specific undeployment tasks of those artifacts. |
abstract String |
updateSynapseArtifact(OMElement artifactConfig,
String fileName,
String existingArtifactName,
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(OMElement content,
String fileName)
|
Methods inherited from class org.apache.axis2.deployment.AbstractDeployer |
---|
cleanup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.Log deployerLog
protected ConfigurationContext cfgCtx
Constructor Detail |
---|
protected AbstractSynapseArtifactDeployer()
Method Detail |
---|
public void init(ConfigurationContext configCtx)
configCtx
- Axis2 ConfigurationContextpublic void deploy(DeploymentFileData deploymentFileData) throws DeploymentException
deploy
in interface Deployer
deploy
in class AbstractDeployer
deploymentFileData
- file to be used for the deployment
DeploymentException
- in-case of an error in deploying the filedeploySynapseArtifact(org.apache.axiom.om.OMElement,
String,java.util.Properties)
public void undeploy(String fileName) throws DeploymentException
undeploy
in interface Deployer
undeploy
in class AbstractDeployer
fileName
- file describing the artifact to be undeployed
DeploymentException
- in case of an error in undeploymentundeploySynapseArtifact(
String)
public void setDirectory(String directory)
public void setExtension(String extension)
public abstract String deploySynapseArtifact(OMElement artifactConfig, String fileName, 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 artifact
deploy(
org.apache.axis2.deployment.repository.util.DeploymentFileData)
public abstract String updateSynapseArtifact(OMElement artifactConfig, String fileName, String existingArtifactName, 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 information
public abstract void undeploySynapseArtifact(String artifactName)
artifactName
- name of the artifact to be undeployedundeploy(String)
public abstract void restoreSynapseArtifact(String artifactName)
artifactName
- name of the artifact to be restoredprotected SynapseConfiguration getSynapseConfiguration() throws DeploymentException
DeploymentException
protected SynapseEnvironment getSynapseEnvironment() throws DeploymentException
DeploymentException
protected ServerConfigurationInformation getServerConfigurationInformation() throws DeploymentException
DeploymentException
protected ServerContextInformation getServerContextInformation() throws DeploymentException
DeploymentException
protected void writeToFile(OMElement content, String fileName) throws Exception
Exception
protected void waitForCompletion()
protected void handleSynapseArtifactDeploymentError(String msg)
protected void handleSynapseArtifactDeploymentError(String msg, Exception e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |