code: @SuppressWarnings("deprecation")
      private final void reply(final boolean error, final String errorMessage,
              final String stackTrace, final String statusCode,
              final int statusCodeInt, final String receiveTime,  Map<String, List<String>> responseHeaders) {
          
          if (!sentReply) {
              sentReply = true;
              //make sure not trigger timeout anymore
              cancelCancellable();
              
              final long operationTimeMillis = System.currentTimeMillis()
                      - startTimeMillis;
  
              if (sender != null
                      && !sender.equals(getContext().system().deadLetters())) {
  
                  response.setReceiveTimeInManager(PcDateUtils
                          .getNowDateTimeStrStandard());
                  response.setError(error);
                  response.setErrorMessage(errorMessage);
                  response.setStackTrace(stackTrace);
                  response.setOperationTimeMillis(operationTimeMillis);
                  response.setRequest(request);
                  response.setStatusCode(statusCode);
                  response.setStatusCodeInt(statusCodeInt);
                  response.setReceiveTime(receiveTime);
                  response.setResponseHeaders(responseHeaders);
  
                  // add history.
                  if (request.isPollable() && pollerData != null) {
                      response.getPollingHistoryMap().putAll(
                              pollerData.getPollingHistoryMap());
                  }
                  
                  // handle response. if handle in manager, getHandler() will be null
                  if (request != null && request.getHandler() != null) {
                      try {
                          //logger.debug("HANDLE IN WORKER : " + response.getHost());
                          request.getHandler().onCompleted(response,
                                  request.getResponseContext());
                      } catch (Exception t) {
                          logger.error("Error handling onCompleted in op worker for response: {} Error {}"
                                  , response.toString(),  t.getLocalizedMessage());
                      }
                  }
                  sender.tell(response, getSelf());
              }
              
              if (asyncWorker != null && !asyncWorker.isTerminated()) {
                  getContext().stop(asyncWorker);
              } 
          }
      }
docs: Reply.
  
  @param error the error
  @param errorMessage the error message
  @param stackTrace the stack trace
  @param statusCode the status code
  @param statusCodeInt the status code int
  @param receiveTime the receive time
  @param responseHeaders the response headers