Class AbstractJettyEmbeddedLocalDeployer

    • Method Detail

      • deployWebApp

        public abstract Object deployWebApp​(Deployable deployable)
        Implement to perform the work of the deploy.
        Parameters:
        deployable - the deployable
        Returns:
        the webapp object that was deployed
      • undeployWebApp

        public abstract void undeployWebApp​(Deployable deployable)
        Implement to perform the work of the undeploy.
        Parameters:
        deployable - the webapp to undeploy
      • setVirtualHosts

        public void setVirtualHosts​(String[] hosts)
        Set a list of virtual hosts corresponding to the webapps deployed via this deployer.
        Parameters:
        hosts - list of virtual host names
      • getVirtualHosts

        public String[] getVirtualHosts()
        Returns:
        the virtual hosts
      • setExtractWar

        public void setExtractWar​(Boolean extract)
        If true, all wars deployed by this deployer will be extracted before being deployed. If false, they won't be extracted first. If null, jetty will do the default.
        Parameters:
        extract - true=extract; false=don't extract, null=do container default
      • getExtractWar

        public Boolean getExtractWar()
        Returns:
        whether to extract or not
      • setCopyWebApp

        public void setCopyWebApp​(Boolean copy)
        copy webapp.
        Parameters:
        copy - if true, unpacked wars will be copied to a tmp location so their jars can be replaced at runtime
      • getCopyWebApp

        public Boolean getCopyWebApp()
        Returns:
        wether to copy unpacked war or not
      • setParentLoaderPriority

        public void setParentLoaderPriority​(Boolean java2compliant)
        This is called java2classloadercompliance setting in jetty5 and the parentloaderpriority in jetty6. If true, the webapp classloader will try the parent. classloader first.
        Parameters:
        java2compliant - true=inverted loading, false=servlet spec, null=do the container default
      • getParentLoaderPriority

        public Boolean getParentLoaderPriority()
        Returns:
        the class loader priority
      • getDeployedWebAppContext

        protected static Object getDeployedWebAppContext​(Deployable deployable)
        Get the deployable that matches the context path.
        Parameters:
        deployable - the deployable object
        Returns:
        the webapp object
      • addDeployedWebAppContext

        protected static void addDeployedWebAppContext​(String context,
                                                       Object deployedWebApp)
        Add a new entry to the context path:deployable map.
        Parameters:
        context - the contextpath for the webapp
        deployedWebApp - the jetty webapp object
      • removeDeployedWebAppContext

        protected static void removeDeployedWebAppContext​(String context)
        Take a map entry away using the key.
        Parameters:
        context - the context path
      • getContext

        public static String getContext​(Deployable deployable)
        Get the context path for the webapp.
        Parameters:
        deployable - the deployable
        Returns:
        the context path