Class WarDownloadServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
io.antmedia.console.servlet.WarDownloadServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class WarDownloadServlet extends jakarta.servlet.http.HttpServlet
The servlet to download the war file of the application When an app is created, the war file is created in the tmp directory This servlet just checks if the war file exists on the tmp directory and if it exists, it sends the war file to the client(another node in the cluster) It's used in app distribution in the cluster
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    private static final long
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    void
    doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    TCPCluster makes the head requests if the file is in this instance TCPCluster#checkIfResourceExist
    getAppAdaptor(String appName, jakarta.servlet.http.HttpServletRequest req)
     
    getApplication(jakarta.servlet.http.HttpServletRequest req)
     
    getContext(jakarta.servlet.http.HttpServletRequest req)
     
    void
    sendError(jakarta.servlet.http.HttpServletResponse response, int status, String message)
     

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doOptions, doPost, doPut, doTrace, getLastModified, init, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final org.slf4j.Logger logger
  • Constructor Details

    • WarDownloadServlet

      public WarDownloadServlet()
  • Method Details

    • getContext

      public WebApplicationContext getContext(jakarta.servlet.http.HttpServletRequest req)
    • getApplication

      public AdminApplication getApplication(jakarta.servlet.http.HttpServletRequest req)
    • getAppAdaptor

      public AntMediaApplicationAdapter getAppAdaptor(String appName, jakarta.servlet.http.HttpServletRequest req)
    • doHead

      public void doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      TCPCluster makes the head requests if the file is in this instance TCPCluster#checkIfResourceExist
      Overrides:
      doHead in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • sendError

      public void sendError(jakarta.servlet.http.HttpServletResponse response, int status, String message)
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet