code: public void resolve(@Nullable final Object value) {
      if (value == null) {
        handler.handle(null, null);
      } else {
        Result result;
        if (value instanceof Result) {
          super.set(value);
          result = (Result) value;
        } else {
          super.set(value);
          result = clone();
        }
        handler.handle(result, null);
      }
    }
docs: Resolve the deferred value and handle it. This method will send the response to a client and
  cleanup and close all the resources.
  
  @param value A value for this deferred.