@Override
  public Future<Long> write(ByteBuffer src, Callback<Long> callback) {
    FutureResult<Long> futureResult = new FutureResult<>();
    write(Unpooled.wrappedBuffer(src), new Callback<Long>() {
      @Override
      public void onCompletion(Long result, Exception exception) {
        long r = result == null ? src.position() : result.longValue();
        src.position((int) r);
        futureResult.done(r, exception);
        if (callback != null) {
          callback.onCompletion(result, exception);
        }
      }
    });
    return futureResult;
  }
Create an instance of NettyResponseChannel that will use {@code ctx} to return responses.
@param ctx the {@link ChannelHandlerContext} to use.
@param nettyMetrics the {@link NettyMetrics} instance to use.
@param performanceConfig the configuration object to use for performance evaluation.
@param nettyConfig the configuration object to use for netty related config.
ambry-rest/src/main/java/com/github/ambry/rest/NettyResponseChannel.java