Class UpdateServlet
UpdateServlet
- public class UpdateServlet
The UpdateServlet handles the automatic updating of the bioquery program, in collaboration
with class BQUpdate on the Client side. BQUpdate determines the Build Number of the
appropriate files, and sends the Build Number to this class, which checks the Build Number
of the files on the server. If they are different, this class assumes the server has the
most up-to-date version and sends it back to the Client.
|
Method Summary |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
doGet method for testing purposes only. |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Handles requests from the Client. |
void |
init()
Loads the jar file directory parameter from the web.xml file. |
UpdateServlet
public UpdateServlet()
init
public void init()
throws ServletException
- Loads the jar file directory parameter from the web.xml file.
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
- doGet method for testing purposes only. Not used by the program.
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
- Handles requests from the Client. Uses a Protocol based on constants in the BQUpdate
class. Can handle 2 method requests: CHECK and RETRIEVE
CHECK means the Client is sending a filename and a Build Number. This Servlet will
responsd with either BQUPDATE.OK or BQUPDATE.UPDATENEEDED
After the Client receives an UPDATENEEDED Response, it will may ask for the update
with the RETRIEVE method and will send the requested filename. The file will come back
in the response.