com.sun.faban.harness.webclient
Class CLIServlet

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

public class CLIServlet
extends HttpServlet

The Submitter servlet is used to submit a benchmark run from the CLI.

Author:
Akara Sucharitakul
See Also:
Serialized Form

Constructor Summary
CLIServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Lists pending runs, obtains status, or show logs of a particular run. Pending: http://..../pending/ Status: http://..../status/${runid} Logs: http://..../logs/${runid} Tail Logs: http://..../logs/${runid}/tail Follow Logs: http://..../logs/${runid}/follow Combination of tail and follow, postfix /tail/follow .
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Submits new runs or kills runs.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, 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

CLIServlet

public CLIServlet()
Method Detail

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Lists pending runs, obtains status, or show logs of a particular run.
  1. Pending: http://..../pending/
  2. Status: http://..../status/${runid}
  3. Logs: http://..../logs/${runid}
  4. Tail Logs: http://..../logs/${runid}/tail
  5. Follow Logs: http://..../logs/${runid}/follow
  6. Combination of tail and follow, postfix /tail/follow
.

Overrides:
doGet in class HttpServlet
Parameters:
request - The request object
response - The response object
Throws:
ServletException - Error executing servlet
IOException - I/O error

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Submits new runs or kills runs. For submission, the POST request must be a multi-part POST. The first parts contain user name and password information (if security is enabled). Each subsequent part contains the run configuration file. The configuration file is not used for kill requests.

Path to call this servlet is http://.../submit/${benchmark}/${profile} and http://.../kill/${runId}.

Overrides:
doPost in class HttpServlet
Parameters:
request - The mime multi-part post request
response - The response object
Throws:
ServletException - Error executing servlet
IOException - I/O error