docs: @Override
      public void onReceive(Object message) throws Exception {
          try {
              if (message instanceof RequestWorkerMsgType) {
                  switch ((RequestWorkerMsgType) message) {
                  case PROCESS_REQUEST:
                      tryCount++;
  
                      if (tryCount == 1) {
                          sender = getSender();
  
                          BoundRequestBuilder request = createRequest();
  
                          // 20150229: create the future and make sure future is
                          // killed when timeout.
                          responseFuture = request.execute(new HttpAsyncHandler(
                                  this));
                          timeoutDuration = Duration.create(
                                  actorMaxOperationTimeoutSec, TimeUnit.SECONDS);
  
                          // To handle cases where nio response never comes back,
                          // we
                          // schedule a 'timeout' message to be sent to us 2
                          // seconds
                          // after NIO's SO_TIMEOUT
                          timeoutMessageCancellable = getContext()
                                  .system()
                                  .scheduler()
                                  .scheduleOnce(
                                          timeoutDuration,
                                          getSelf(),
                                          RequestWorkerMsgType.PROCESS_ON_TIMEOUT,
                                          getContext().system().dispatcher(),
                                          getSelf());
                      } else {
                          getLogger().error(
                                  "duplicated PROCESS_REQUEST msg. ignore...");
                      }
                      break;
  
                  case CANCEL:
                      getLogger().info(
                              "Request was CANCELLED.................{}",
                              requestUrl);
                      cancelCancellable();
                      if (sender == null)
                          sender = getSender();
                      reply(null, true, PcConstants.REQUEST_CANCELED,
                              PcConstants.REQUEST_CANCELED, PcConstants.NA,
                              PcConstants.NA_INT, null);
                      break;
  
                  case PROCESS_ON_EXCEPTION:
  
                      String errorSummary = PcErrorMsgUtils.replaceErrorMsg(cause
                              .toString());
                      String stackTrace = PcStringUtils.printStackTrace(cause);
                      cancelCancellable();
                      reply(null, true, errorSummary, stackTrace, PcConstants.NA,
                              PcConstants.NA_INT, null);
  
                      break;
  
                  case PROCESS_ON_TIMEOUT:
  
                      getLogger().error("PROCESS_ON_TIMEOUT.................{}",
                              requestUrl);
                      cancelCancellable();
  
                      String errorMsg = String
                              .format("HttpWorker Timedout after %d SEC (no response but no exception catched). Check URL: may be very slow or stuck.",
                                      actorMaxOperationTimeoutSec);
  
                      reply(null, true, errorMsg, errorMsg, PcConstants.NA,
                              PcConstants.NA_INT, null);
                      break;
  
                  case CHECK_FUTURE_STATE:
                  default:
                      this.cause = new ActorMessageTypeInvalidException(
                              "ActorMessageTypeInvalidException error for url "
                                      + this.requestUrl);
                      getSelf().tell(RequestWorkerMsgType.PROCESS_ON_EXCEPTION,
                              getSelf());
                      break;
                  }
              } else {
                  unhandled(message);
                  this.cause = new ActorMessageTypeInvalidException(
                          "ActorMessageTypeInvalidException error for url "
                                  + this.requestUrl);
                  getSelf().tell(RequestWorkerMsgType.PROCESS_ON_EXCEPTION,
                          getSelf());
              }
          } catch (Exception e) {
              this.cause = e;
              getSelf()
                      .tell(RequestWorkerMsgType.PROCESS_ON_EXCEPTION, getSelf());
          }
      }