protected void onSuccess(AsyncRequest<D, RQ> asyncRequest, ResponseStatus status) {
    final WriteResponse response = WriteResponse.EMPTY;
    for (final AsyncRequest.Thunk thunk: asyncRequest.getThunks()) {
      WriteCallback callback = (WriteCallback) thunk.callback;
      callback.onSuccess(new WriteResponse() {
        @Override
        public Object getRawResponse() {
          return response.getRawResponse();
        }

        @Override
        public String getStringResponse() {
          return response.getStringResponse();
        }

        @Override
        public long bytesWritten() {
          return thunk.sizeInBytes;
        }
      });
    }
  }
protected void onSuccess ( AsyncRequest < D , RQ > asyncRequest , ResponseStatus status ) { final WriteResponse response = WriteResponse . EMPTY ; for ( final AsyncRequest . Thunk thunk : asyncRequest . getThunks ( ) ) { WriteCallback callback = ( WriteCallback ) thunk . callback ; callback . onSuccess ( new WriteResponse ( ) { @ Override public Object getRawResponse ( ) { return response . getRawResponse ( ) ; } @ Override public String getStringResponse ( ) { return response . getStringResponse ( ) ; } @ Override public long bytesWritten ( ) { return thunk . sizeInBytes ; } } ) ; } }
Callback on sending the asyncRequest successfully