class StartTransferRequestHandler implements TransportRequestHandler<BlobRecoveryStartTransferRequest> {
        @Override
        public void messageReceived(BlobRecoveryStartTransferRequest request, TransportChannel channel) throws Exception {<FILL_FUNCTION_BODY>}
    }

            BlobRecoveryStatus status = onGoingBlobRecoveries.get(request.recoveryId());
            LOGGER.debug("received BlobRecoveryStartTransferRequest for file {} with size {}",
                         request.path(), request.size());
            if (status == null) {
                throw new IllegalBlobRecoveryStateException("Could not retrieve onGoingRecoveryStatus");
            }
            if (status.canceled()) {
                throw new IndexShardClosedException(status.shardId());
            }


            BlobShard shard = status.blobShard;
            String tmpPath = request.path() + "." + request.transferId();
            Path baseDirectory = shard.blobContainer().getBaseDirectory();
            FileOutputStream outputStream = new FileOutputStream(baseDirectory.resolve(tmpPath).toFile());
            request.content().writeTo(outputStream);

            if (request.size() == request.content().length()) {  // start request contains the whole file.
                outputStream.close();
                Path source = baseDirectory.resolve(tmpPath);
                Path target = baseDirectory.resolve(request.path());

                Files.move(source, target, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
            } else {
                BlobRecoveryTransferStatus transferStatus = new BlobRecoveryTransferStatus(
                    request.transferId(), outputStream, tmpPath, request.path()
                );
                status.onGoingTransfers().put(request.transferId(), transferStatus);
            }

            channel.sendResponse(TransportResponse.Empty.INSTANCE);
        
<no_super_class>