code: public static void processTask(Task task) {
      logger.finest("Processing task " + task);
      try {
        switch (task.getType()) {
          case RUN_JOB:
            runJob((RunJobTask) task);
            break;
          case HANDLE_SLOT_FILLED:
            handleSlotFilled((HandleSlotFilledTask) task);
            break;
          case FINALIZE_JOB:
            finalizeJob((FinalizeJobTask) task);
            break;
          case FAN_OUT:
            handleFanoutTaskOrAbandonTask((FanoutTask) task);
            break;
          case CANCEL_JOB:
            cancelJob((CancelJobTask) task);
            break;
          case DELETE_PIPELINE:
            DeletePipelineTask deletePipelineTask = (DeletePipelineTask) task;
            try {
              backEnd.deletePipeline(
                  deletePipelineTask.getRootJobKey(), deletePipelineTask.shouldForce(), false);
            } catch (Exception e) {
              logger.log(Level.WARNING, "DeletePipeline operation failed.", e);
            }
            break;
          case HANDLE_CHILD_EXCEPTION:
            handleChildException((HandleChildExceptionTask) task);
            break;
          case DELAYED_SLOT_FILL:
            handleDelayedSlotFill((DelayedSlotFillTask) task);
            break;
          default:
            throw new IllegalArgumentException("Unrecognized task type: " + task.getType());
        }
      } catch (AbandonTaskException ate) {
        // return 200;
      }
    }
docs: Process an incoming task received from the App Engine task queue.
  
  @param task The task to be processed.