Class JettyDeployer


  • public class JettyDeployer
    extends Object
    Contains the common deployment logic used by the Jetty Cargo deployer servlets.

    This class deliberately has no dependency on either the Servlet API or the Servlet API. The servlet-specific classes adapt HTTP requests and responses to the abstractions defined here.
    • Constructor Detail

      • JettyDeployer

        public JettyDeployer​(JettyDeployer.Context context,
                             File webAppDirectory,
                             long timeout)
        Creates a deployer.
        Parameters:
        context - Jetty context adapter
        webAppDirectory - directory containing deployed WAR files
        timeout - deployment timeout in milliseconds
    • Method Detail

      • deploy

        protected void deploy​(JettyDeployer.Response response,
                              String contextPath,
                              String warURL)
                       throws IOException
        Deploys a WAR referenced by a URL.
        Parameters:
        response - response adapter
        contextPath - context path
        warURL - WAR URL
        Throws:
        IOException - if the WAR cannot be copied
      • undeploy

        protected void undeploy​(JettyDeployer.Response response,
                                String contextPath)
                         throws IOException
        Undeploys a web application.
        Parameters:
        response - response adapter
        contextPath - context path
        Throws:
        IOException - if the response cannot be written
      • getWebAppFilename

        protected String getWebAppFilename​(String context)
        Converts a context path into the filename used for its WAR.
        Parameters:
        context - context path
        Returns:
        WAR filename without extension