code: public void handleRequest(final HttpServletRequest request, final HttpServletResponse response, final AnalysisListener ... analysisListeners) throws IOException {
          final String jobId = request.getParameter(HttpClusterManager.HTTP_PARAM_SLAVE_JOB_ID);
          final String action = request.getParameter(HttpClusterManager.HTTP_PARAM_ACTION);
  
          if (HttpClusterManager.ACTION_CANCEL.equals(action)) {
              logger.info("Handling 'cancel' request: {}", jobId);
              cancelJob(jobId);
              return;
          }
  
          if (HttpClusterManager.ACTION_RUN.equals(action)) {
              logger.info("Handling 'run' request: {}", jobId);
  
              final AnalysisJob job;
              try {
                  job = readJob(request);
              } catch (IOException e) {
                  logger.error("Failed to read job definition from HTTP request", e);
                  throw e;
              }
  
              final Serializable resultObject;
              try {
                  final AnalysisResultFuture resultFuture = runJob(job, jobId, analysisListeners);
                  resultObject = serializeResult(resultFuture, jobId);
              } catch (RuntimeException e) {
                  logger.error("Unexpected error occurred while running slave job", e);
                  throw e;
              }
  
              try {
                  sendResponse(response, resultObject);
              } catch (IOException e) {
                  logger.error("Failed to send job result through HTTP response", e);
                  throw e;
              }
  
              return;
          }
  
          logger.warn("Unspecified action request: {}", jobId);
      }
docs: Completely handles a HTTP request and response. This method is
  functionally equivalent of calling these methods in sequence:
  
  {@link #readJob(HttpServletRequest)}
  
  {@link #runJob(AnalysisJob, String, AnalysisListener...)
  
  {@link #serializeResult(AnalysisResultFuture, String)}
  
  {@link #sendResponse(HttpServletResponse, Serializable)}
  
  @param request
  @param response
  @param analysisListeners
  @throws IOException