com.sun.faban.harness.webclient
Class RunUploader

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.sun.faban.harness.webclient.RunUploader
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class RunUploader
extends HttpServlet

The RunUploader represents the upload servlet as well as an upload client maintained in a single class.

Author:
Akara Sucharitakul
See Also:
Serialized Form

Constructor Summary
RunUploader()
           
 
Method Summary
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Post method to upload the run.
static void uploadIfOrigin(String runId)
          Client call to upload the run back to the originating server.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunUploader

public RunUploader()
Method Detail

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Post method to upload the run.

Overrides:
doPost in class HttpServlet
Parameters:
request - The servlet request
response - The servlet response
Throws:
ServletException - If the servlet fails
IOException - If there is an I/O error

uploadIfOrigin

public static void uploadIfOrigin(String runId)
                           throws IOException
Client call to upload the run back to the originating server. This method does nothing if the run is local.

Parameters:
runId - The id of the run
Throws:
IOException - If the upload fails