Package io.antmedia.console.servlet
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
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final long
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doGet
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) AdminApplication makes the requests inAdminApplication.downloadWarFile(java.lang.String, java.lang.String, java.lang.String)
void
doHead
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) TCPCluster makes the head requests if the file is in this instanceTCPCluster#checkIfResourceExist
getAppAdaptor
(String appName, jakarta.servlet.http.HttpServletRequest req) getApplication
(jakarta.servlet.http.HttpServletRequest req) getContext
(jakarta.servlet.http.HttpServletRequest req) void
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
-
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
-
getApplication
-
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 instanceTCPCluster#checkIfResourceExist
- Overrides:
doHead
in classjakarta.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) AdminApplication makes the requests inAdminApplication.downloadWarFile(java.lang.String, java.lang.String, java.lang.String)
- Overrides:
doGet
in classjakarta.servlet.http.HttpServlet
-