Class MicroservicesDeployer

  • All Implemented Interfaces:
    org.wso2.carbon.deployment.engine.Deployer

    public class MicroservicesDeployer
    extends java.lang.Object
    implements org.wso2.carbon.deployment.engine.Deployer
    Implementation of the micro service deployer. This will be picked by the DeploymentEngine service according to the whiteboard pattern to deploy micro service POJO artifacts.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object deploy​(org.wso2.carbon.deployment.engine.Artifact artifact)
      Deploy and artifact in the netty-http service.
      org.wso2.carbon.deployment.engine.ArtifactType getArtifactType()  
      java.net.URL getLocation()  
      void init()  
      void undeploy​(java.lang.Object key)
      Undeploy the artifact with the key from the netty-http service.
      java.lang.Object update​(org.wso2.carbon.deployment.engine.Artifact artifact)
      Update the artifact from the netty-http service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MicroservicesDeployer

        public MicroservicesDeployer()
    • Method Detail

      • init

        public void init()
        Specified by:
        init in interface org.wso2.carbon.deployment.engine.Deployer
      • deploy

        public java.lang.Object deploy​(org.wso2.carbon.deployment.engine.Artifact artifact)
                                throws org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException
        Deploy and artifact in the netty-http service.
        Specified by:
        deploy in interface org.wso2.carbon.deployment.engine.Deployer
        Parameters:
        artifact - the artifact to be deployed
        Returns:
        A key to identify the deployed artifact
        Throws:
        org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException - If deployment fails
      • undeploy

        public void undeploy​(java.lang.Object key)
                      throws org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException
        Undeploy the artifact with the key from the netty-http service.
        Specified by:
        undeploy in interface org.wso2.carbon.deployment.engine.Deployer
        Parameters:
        key - Key to identify the artifact
        Throws:
        org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException - If an error occurs while undeploying
      • update

        public java.lang.Object update​(org.wso2.carbon.deployment.engine.Artifact artifact)
                                throws org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException
        Update the artifact from the netty-http service.
        Specified by:
        update in interface org.wso2.carbon.deployment.engine.Deployer
        Parameters:
        artifact - the artifact to be deployed
        Returns:
        A key to identify the deployed artifact
        Throws:
        org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException - If update fails
      • getLocation

        public java.net.URL getLocation()
        Specified by:
        getLocation in interface org.wso2.carbon.deployment.engine.Deployer
        Returns:
        Artifact deployment location relative to the server dir in repository
      • getArtifactType

        public org.wso2.carbon.deployment.engine.ArtifactType getArtifactType()
        Specified by:
        getArtifactType in interface org.wso2.carbon.deployment.engine.Deployer
        Returns:
        Artifact deployment location