Search in sources :

Example 1 with NettyTransferService

use of org.dcache.pool.movers.NettyTransferService in project dcache by dCache.

the class HttpPoolRequestHandler method doOnPut.

@Override
protected ChannelFuture doOnPut(ChannelHandlerContext context, HttpRequest request) {
    NettyTransferService<HttpProtocolInfo>.NettyMoverChannel file = null;
    Exception exception = null;
    if (isBadRequest(request)) {
        return context.newSucceededFuture();
    }
    try {
        checkContentHeader(request.headers().names(), SUPPORTED_CONTENT_HEADERS);
        file = open(request, true);
        if (!file.getIoMode().contains(StandardOpenOption.WRITE)) {
            throw new HttpException(METHOD_NOT_ALLOWED.code(), "Resource is not open for writing");
        }
        contentMd5Checksum(request).ifPresent(file::addChecksum);
        OptionalLong contentLength = contentLength(request);
        if (contentLength.isPresent()) {
            file.truncate(contentLength.getAsLong());
        } else if (file.getFileAttributes().isDefined(FileAttribute.SIZE)) {
            file.truncate(file.getFileAttributes().getSize());
        }
        file.getProtocolInfo().getWantedChecksum().ifPresent(file::addChecksumType);
        _wantedDigest = wantDigest(request).flatMap(Checksums::parseWantDigest);
        _wantedDigest.ifPresent(file::addChecksumType);
        if (is100ContinueExpected(request)) {
            context.writeAndFlush(new DefaultFullHttpResponse(HTTP_1_1, CONTINUE)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        }
        _writeChannel = file;
        file = null;
        return null;
    } catch (Redirect e) {
        exception = e;
        return context.writeAndFlush(e.createResponse());
    } catch (HttpException e) {
        exception = e;
        return context.writeAndFlush(createErrorResponse(HttpResponseStatus.valueOf(e.getErrorCode()), e.getMessage()));
    } catch (URISyntaxException e) {
        exception = e;
        return context.writeAndFlush(createErrorResponse(BAD_REQUEST, "URI is not valid: " + e.getMessage()));
    } catch (IllegalArgumentException e) {
        exception = e;
        return context.writeAndFlush(createErrorResponse(BAD_REQUEST, e.getMessage()));
    } catch (IOException | RuntimeException e) {
        exception = e;
        return context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, e.getMessage()));
    } finally {
        if (file != null) {
            file.release(exception);
            _files.remove(file);
        }
    }
}
Also used : DefaultFullHttpResponse(io.netty.handler.codec.http.DefaultFullHttpResponse) NettyTransferService(org.dcache.pool.movers.NettyTransferService) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) URISyntaxException(java.net.URISyntaxException) OutOfDiskException(org.dcache.pool.repository.OutOfDiskException) HttpException(dmg.util.HttpException) CacheException(diskCacheV111.util.CacheException) FileCorruptedCacheException(diskCacheV111.util.FileCorruptedCacheException) ClosedChannelException(java.nio.channels.ClosedChannelException) IOException(java.io.IOException) OptionalLong(java.util.OptionalLong) HttpException(dmg.util.HttpException)

Example 2 with NettyTransferService

use of org.dcache.pool.movers.NettyTransferService in project dcache by dCache.

the class HttpPoolRequestHandler method doOnGet.

/**
 * Single GET operation.
 * <p>
 * Finds the correct mover channel using the UUID in the GET. Range queries are supported. The
 * file will be sent to the remote peer in chunks to avoid server side memory issues.
 */
@Override
protected ChannelFuture doOnGet(ChannelHandlerContext context, HttpRequest request) {
    NettyTransferService<HttpProtocolInfo>.NettyMoverChannel file;
    List<HttpByteRange> ranges;
    long fileSize;
    if (isBadRequest(request)) {
        return context.newSucceededFuture();
    }
    try {
        file = open(request, false);
        if (file.getIoMode().contains(StandardOpenOption.WRITE)) {
            throw new HttpException(METHOD_NOT_ALLOWED.code(), "Resource is not open for reading");
        }
        fileSize = file.size();
        ranges = parseHttpRange(request, 0, fileSize - 1);
    } catch (Redirect e) {
        return context.writeAndFlush(e.createResponse());
    } catch (HttpException e) {
        return context.writeAndFlush(createErrorResponse(e.getErrorCode(), e.getMessage()));
    } catch (URISyntaxException e) {
        return context.writeAndFlush(createErrorResponse(BAD_REQUEST, "URI not valid: " + e.getMessage()));
    } catch (IllegalArgumentException e) {
        return context.writeAndFlush(createErrorResponse(BAD_REQUEST, e.getMessage()));
    } catch (IOException e) {
        return context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, e.getMessage()));
    }
    Optional<String> digest = wantDigest(request).flatMap(h -> Checksums.digestHeader(h, file.getFileAttributes()));
    if (ranges == null || ranges.isEmpty()) {
        /*
             * GET for a whole file
             */
        context.write(new HttpGetResponse(fileSize, file, digest)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        context.write(read(file, 0, fileSize - 1)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        ChannelFuture writeAndFlush = context.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
        // Release the file immediately after supplying all of the file's content.  We're
        // assuming that the client will not make further requests against this URL.  This is
        // done to send the DoorTransferFinishedMessage in a timely fashion.
        writeAndFlush.addListener(f -> file.release());
        return writeAndFlush;
    } else if (ranges.size() == 1) {
        /* RFC 2616: 14.16. A response to a request for a single range
             * MUST NOT be sent using the multipart/byteranges media type.
             */
        HttpByteRange range = ranges.get(0);
        context.write(new HttpPartialContentResponse(range.getLower(), range.getUpper(), fileSize, digest)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        context.write(read(file, range.getLower(), range.getUpper())).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        // client will not make further requests against this URL.
        return context.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
    } else {
        /*
             * GET for multiple ranges
             */
        long totalLen = 0;
        ByteBuf[] fragmentMarkers = new ByteBuf[ranges.size()];
        for (int i = 0; i < ranges.size(); i++) {
            HttpByteRange range = ranges.get(i);
            long upper = range.getUpper();
            long lower = range.getLower();
            totalLen += upper - lower + 1;
            ByteBuf buffer = fragmentMarkers[i] = createMultipartFragmentMarker(lower, upper, fileSize);
            totalLen += buffer.readableBytes();
        }
        ByteBuf endMarker = createMultipartEnd();
        totalLen += endMarker.readableBytes();
        context.write(new HttpMultipartResponse(digest, totalLen)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        for (int i = 0; i < ranges.size(); i++) {
            HttpByteRange range = ranges.get(i);
            context.write(fragmentMarkers[i]).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
            context.write(read(file, range.getLower(), range.getUpper())).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
        }
        // client will not make further requests against this URL.
        return context.writeAndFlush(new DefaultLastHttpContent(endMarker));
    }
}
Also used : ChannelFuture(io.netty.channel.ChannelFuture) NettyTransferService(org.dcache.pool.movers.NettyTransferService) HttpByteRange(diskCacheV111.util.HttpByteRange) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) StringMarkup.quotedString(org.dcache.util.StringMarkup.quotedString) ByteBuf(io.netty.buffer.ByteBuf) DefaultLastHttpContent(io.netty.handler.codec.http.DefaultLastHttpContent) HttpException(dmg.util.HttpException)

Example 3 with NettyTransferService

use of org.dcache.pool.movers.NettyTransferService in project dcache by dCache.

the class HttpPoolRequestHandler method open.

/**
 * Get the mover channel for a certain HTTP request. The mover channel is identified by UUID
 * generated upon mover start and sent back to the door as a part of the address info.
 *
 * @param request   HttpRequest that was sent by the client
 * @param exclusive True if the mover channel exclusively is to be opened in exclusive mode.
 *                  False if the mover channel can be shared with other requests.
 * @return Mover channel for specified UUID
 * @throws IllegalArgumentException Request did not include UUID or no mover channel found for
 *                                  UUID in the request
 */
private NettyTransferService<HttpProtocolInfo>.NettyMoverChannel open(HttpRequest request, boolean exclusive) throws IllegalArgumentException, URISyntaxException, Redirect {
    QueryStringDecoder queryStringDecoder = new QueryStringDecoder(request.getUri());
    Map<String, List<String>> params = queryStringDecoder.parameters();
    if (!params.containsKey(HttpTransferService.UUID_QUERY_PARAM)) {
        if (!request.getUri().equals("/favicon.ico")) {
            LOGGER.error("Received request without UUID in the query " + "string. Request-URI was {}", request.getUri());
        }
        throw new IllegalArgumentException("Query string does not include any UUID.");
    }
    List<String> uuidList = params.get(HttpTransferService.UUID_QUERY_PARAM);
    if (uuidList.isEmpty()) {
        throw new IllegalArgumentException("UUID parameter does not include any value.");
    }
    UUID uuid = UUID.fromString(uuidList.get(0));
    NettyTransferService<HttpProtocolInfo>.NettyMoverChannel file = _server.openFile(uuid, exclusive);
    if (file == null) {
        Optional<URI> referrer = buildReferrer(request, params);
        if (referrer.isPresent()) {
            throw new Redirect(referrer.get(), "Request is no longer valid");
        }
        throw new IllegalArgumentException("Request is no longer valid. " + "Please resubmit to door.");
    }
    URI uri = new URI(request.getUri());
    FsPath requestedFile = FsPath.create(uri.getPath());
    FsPath transferFile = FsPath.create(file.getProtocolInfo().getPath());
    if (!requestedFile.equals(transferFile)) {
        LOGGER.warn("Received an illegal request for file {}, while serving {}", requestedFile, transferFile);
        throw new IllegalArgumentException("The file you specified does " + "not match the UUID you specified!");
    }
    _files.add(file);
    return file;
}
Also used : NettyTransferService(org.dcache.pool.movers.NettyTransferService) StringMarkup.quotedString(org.dcache.util.StringMarkup.quotedString) URI(java.net.URI) QueryStringDecoder(io.netty.handler.codec.http.QueryStringDecoder) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) UUID(java.util.UUID) FsPath(diskCacheV111.util.FsPath)

Example 4 with NettyTransferService

use of org.dcache.pool.movers.NettyTransferService in project dcache by dCache.

the class XrootdPoolRequestHandler method doOnOpen.

/**
 * Obtains the right mover channel using an opaque token in the request. The mover channel is
 * wrapped by a file descriptor. The file descriptor is stored for subsequent access.
 * <p>
 * In the case that this is a write request as destination in a third party copy, a third-party
 * client is started.  The client issues login, open and read requests to the source server, and
 * writes the responses to the file descriptor.
 * <p>
 * The third-party client also sends a sync response back to the client when the transfer has
 * completed.
 */
@Override
protected XrootdResponse<OpenRequest> doOnOpen(ChannelHandlerContext ctx, OpenRequest msg) throws XrootdException {
    try {
        Map<String, String> opaqueMap = getOpaqueMap(msg.getOpaque());
        UUID uuid = getUuid(opaqueMap);
        if (uuid == null) {
            _log.info("Request to open {} contains no UUID.", msg.getPath());
            throw new XrootdException(kXR_NotAuthorized, "Request lacks the " + UUID_PREFIX + " property.");
        }
        enforceClientTlsIfDestinationRequiresItForTpc(opaqueMap);
        NettyTransferService<XrootdProtocolInfo>.NettyMoverChannel file = _server.openFile(uuid, false);
        if (file == null) {
            _log.info("No mover found for {} with UUID {}.", msg.getPath(), uuid);
            return redirectToDoor(ctx, msg, () -> {
                throw new XrootdException(kXR_NotAuthorized, UUID_PREFIX + " is no longer valid.");
            });
        }
        /*
             *  Stop any timer in case this is a reconnect.
             */
        _server.cancelReconnectTimeoutForMover(uuid);
        _log.debug("doOnOpen, called cancel on reconnect timers for {}", uuid);
        XrootdProtocolInfo protocolInfo = file.getProtocolInfo();
        try {
            FileDescriptor descriptor;
            boolean isWrite = file.getIoMode().contains(StandardOpenOption.WRITE);
            if (msg.isNew() && !isWrite) {
                throw new XrootdException(kXR_FileNotOpen, "File exists.");
            } else if (msg.isDelete() && !isWrite) {
                throw new XrootdException(kXR_Unsupported, "File exists.");
            /*
                     *  Some clients express only kXR_delete when then intend to write
                     *  so we need to consider delete as a write request here.
                     */
            } else if ((msg.isNew() || msg.isReadWrite() || msg.isDelete()) && isWrite) {
                boolean posc = (msg.getOptions() & kXR_posc) == kXR_posc || protocolInfo.getFlags().contains(XrootdProtocolInfo.Flags.POSC);
                if (opaqueMap.containsKey("tpc.src")) {
                    _log.debug("Request to open {} is as third-party destination.", msg);
                    XrootdTpcInfo tpcInfo = new XrootdTpcInfo(opaqueMap);
                    tpcInfo.setDelegatedProxy(protocolInfo.getDelegatedCredential());
                    tpcInfo.setUid(protocolInfo.getTpcUid());
                    tpcInfo.setGid(protocolInfo.getTpcGid());
                    descriptor = new TpcWriteDescriptor(file, posc, ctx, _server, opaqueMap.get("org.dcache.xrootd.client"), tpcInfo, tlsSessionInfo);
                } else {
                    descriptor = new WriteDescriptor(file, posc);
                }
            } else {
                descriptor = new ReadDescriptor(file);
            }
            FileStatus stat = msg.isRetStat() ? stat(file) : null;
            int fd = addDescriptor(descriptor);
            _redirectingDoor = protocolInfo.getDoorAddress();
            file = null;
            _hasOpenedFiles = true;
            return new OpenResponse(msg, fd, null, null, stat);
        } finally {
            if (file != null) {
                file.release();
            }
        }
    } catch (ParseException e) {
        throw new XrootdException(kXR_ArgInvalid, e.getMessage());
    } catch (IOException e) {
        throw new XrootdException(kXR_IOError, e.getMessage());
    }
}
Also used : NettyTransferService(org.dcache.pool.movers.NettyTransferService) FileStatus(org.dcache.xrootd.util.FileStatus) XrootdProtocolInfo(org.dcache.vehicles.XrootdProtocolInfo) IOException(java.io.IOException) TpcWriteDescriptor(org.dcache.xrootd.tpc.TpcWriteDescriptor) XrootdTpcInfo(org.dcache.xrootd.tpc.XrootdTpcInfo) OpenResponse(org.dcache.xrootd.protocol.messages.OpenResponse) ParseException(org.dcache.xrootd.util.ParseException) UUID(java.util.UUID) XrootdException(org.dcache.xrootd.core.XrootdException) TpcWriteDescriptor(org.dcache.xrootd.tpc.TpcWriteDescriptor)

Example 5 with NettyTransferService

use of org.dcache.pool.movers.NettyTransferService in project dcache by dCache.

the class HttpPoolRequestHandler method doOnContent.

@Override
protected ChannelFuture doOnContent(ChannelHandlerContext context, HttpContent content) {
    if (isBadRequest(content)) {
        return context.newSucceededFuture();
    }
    if (_writeChannel != null) {
        try {
            ByteBuf data = content.content();
            while (data.isReadable()) {
                data.readBytes(_writeChannel, data.readableBytes());
            }
            if (content instanceof LastHttpContent) {
                checkContentHeader(((LastHttpContent) content).trailingHeaders().names(), Collections.singletonList(CONTENT_LENGTH));
                context.channel().config().setAutoRead(false);
                NettyTransferService<HttpProtocolInfo>.NettyMoverChannel writeChannel = _writeChannel;
                _writeChannel = null;
                _files.remove(writeChannel);
                long size = writeChannel.size();
                URI location = writeChannel.getProtocolInfo().getLocation();
                ChannelPromise promise = context.newPromise();
                Futures.addCallback(writeChannel.release(), new FutureCallback<Void>() {

                    @Override
                    public void onSuccess(Void result) {
                        try {
                            Optional<String> digest = _wantedDigest.flatMap(t -> Checksums.digestHeader(t, writeChannel.getFileAttributes()));
                            context.writeAndFlush(new HttpPutResponse(size, location, digest), promise);
                        } catch (IOException e) {
                            context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, e.getMessage()), promise);
                        }
                        context.channel().config().setAutoRead(true);
                    }

                    @Override
                    public void onFailure(Throwable t) {
                        if (t instanceof FileCorruptedCacheException) {
                            context.writeAndFlush(createErrorResponse(BAD_REQUEST, t.getMessage()), promise);
                        } else if (t instanceof CacheException) {
                            context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, t.getMessage()), promise);
                        } else {
                            context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, t.toString()), promise);
                        }
                        context.channel().config().setAutoRead(true);
                    }
                }, MoreExecutors.directExecutor());
                return promise;
            }
        } catch (OutOfDiskException e) {
            _writeChannel.release(e);
            _files.remove(_writeChannel);
            _writeChannel = null;
            return context.writeAndFlush(createErrorResponse(INSUFFICIENT_STORAGE, e.getMessage()));
        } catch (IOException e) {
            _writeChannel.release(e);
            _files.remove(_writeChannel);
            _writeChannel = null;
            return context.writeAndFlush(createErrorResponse(INTERNAL_SERVER_ERROR, e.getMessage()));
        } catch (HttpException e) {
            _writeChannel.release(e);
            _files.remove(_writeChannel);
            _writeChannel = null;
            return context.writeAndFlush(createErrorResponse(HttpResponseStatus.valueOf(e.getErrorCode()), e.getMessage()));
        }
    }
    return null;
}
Also used : NOT_IMPLEMENTED(io.netty.handler.codec.http.HttpResponseStatus.NOT_IMPLEMENTED) URISyntaxException(java.net.URISyntaxException) ChecksumType(org.dcache.util.ChecksumType) LoggerFactory(org.slf4j.LoggerFactory) HttpObject(io.netty.handler.codec.http.HttpObject) LOCATION(io.netty.handler.codec.http.HttpHeaders.Names.LOCATION) Unpooled(io.netty.buffer.Unpooled) ChannelPromise(io.netty.channel.ChannelPromise) HashMultiset(com.google.common.collect.HashMultiset) IdleState(io.netty.handler.timeout.IdleState) Map(java.util.Map) METHOD_NOT_ALLOWED(io.netty.handler.codec.http.HttpResponseStatus.METHOD_NOT_ALLOWED) HTTP_1_1(io.netty.handler.codec.http.HttpVersion.HTTP_1_1) URI(java.net.URI) BYTES(io.netty.handler.codec.http.HttpHeaders.Values.BYTES) FileAttributes(org.dcache.vehicles.FileAttributes) HttpByteRange(diskCacheV111.util.HttpByteRange) HttpRequest(io.netty.handler.codec.http.HttpRequest) IdleStateEvent(io.netty.handler.timeout.IdleStateEvent) INSUFFICIENT_STORAGE(io.netty.handler.codec.http.HttpResponseStatus.INSUFFICIENT_STORAGE) TO_RFC3230(org.dcache.util.Checksums.TO_RFC3230) Collection(java.util.Collection) HttpProtocolInfo(diskCacheV111.vehicles.HttpProtocolInfo) StandardOpenOption(java.nio.file.StandardOpenOption) CONTENT_LOCATION(io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_LOCATION) StringMarkup.percentEncode(org.dcache.util.StringMarkup.percentEncode) HttpResponseStatus(io.netty.handler.codec.http.HttpResponseStatus) UUID(java.util.UUID) OutOfDiskException(org.dcache.pool.repository.OutOfDiskException) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) DecoderResult(io.netty.handler.codec.DecoderResult) List(java.util.List) DefaultHttpResponse(io.netty.handler.codec.http.DefaultHttpResponse) ACCEPT_RANGES(io.netty.handler.codec.http.HttpHeaders.Names.ACCEPT_RANGES) DefaultFullHttpResponse(io.netty.handler.codec.http.DefaultFullHttpResponse) ChunkedInput(io.netty.handler.stream.ChunkedInput) Optional(java.util.Optional) Checksums(org.dcache.util.Checksums) OK(io.netty.handler.codec.http.HttpResponseStatus.OK) NettyTransferService(org.dcache.pool.movers.NettyTransferService) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) FsPath(diskCacheV111.util.FsPath) INTERNAL_SERVER_ERROR(io.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR) Multiset(com.google.common.collect.Multiset) HttpRequestHandler.createRedirectResponse(org.dcache.http.HttpRequestHandler.createRedirectResponse) CONTENT_MD5(io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_MD5) LastHttpContent(io.netty.handler.codec.http.LastHttpContent) BAD_REQUEST(io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST) CONTENT_TYPE(io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_TYPE) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) OptionalLong(java.util.OptionalLong) HttpException(dmg.util.HttpException) CacheException(diskCacheV111.util.CacheException) ImmutableList(com.google.common.collect.ImmutableList) ByteBuf(io.netty.buffer.ByteBuf) Objects.requireNonNull(java.util.Objects.requireNonNull) ChannelFutureListener(io.netty.channel.ChannelFutureListener) CREATED(io.netty.handler.codec.http.HttpResponseStatus.CREATED) FileCorruptedCacheException(diskCacheV111.util.FileCorruptedCacheException) HttpHeaders.is100ContinueExpected(io.netty.handler.codec.http.HttpHeaders.is100ContinueExpected) CONTINUE(io.netty.handler.codec.http.HttpResponseStatus.CONTINUE) HttpContent(io.netty.handler.codec.http.HttpContent) Logger(org.slf4j.Logger) PARTIAL_CONTENT(io.netty.handler.codec.http.HttpResponseStatus.PARTIAL_CONTENT) CONTENT_RANGE(io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_RANGE) ClosedChannelException(java.nio.channels.ClosedChannelException) CharMatcher(com.google.common.base.CharMatcher) IOException(java.io.IOException) FutureCallback(com.google.common.util.concurrent.FutureCallback) ChannelFuture(io.netty.channel.ChannelFuture) Checksum(org.dcache.util.Checksum) FullHttpResponse(io.netty.handler.codec.http.FullHttpResponse) Futures(com.google.common.util.concurrent.Futures) DefaultLastHttpContent(io.netty.handler.codec.http.DefaultLastHttpContent) QueryStringDecoder(io.netty.handler.codec.http.QueryStringDecoder) CONTENT_LENGTH(io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_LENGTH) FileAttribute(org.dcache.namespace.FileAttribute) Collections(java.util.Collections) StringMarkup.quotedString(org.dcache.util.StringMarkup.quotedString) NettyTransferService(org.dcache.pool.movers.NettyTransferService) OutOfDiskException(org.dcache.pool.repository.OutOfDiskException) Optional(java.util.Optional) CacheException(diskCacheV111.util.CacheException) FileCorruptedCacheException(diskCacheV111.util.FileCorruptedCacheException) ChannelPromise(io.netty.channel.ChannelPromise) IOException(java.io.IOException) ByteBuf(io.netty.buffer.ByteBuf) LastHttpContent(io.netty.handler.codec.http.LastHttpContent) DefaultLastHttpContent(io.netty.handler.codec.http.DefaultLastHttpContent) URI(java.net.URI) FileCorruptedCacheException(diskCacheV111.util.FileCorruptedCacheException) HttpException(dmg.util.HttpException)

Aggregations

NettyTransferService (org.dcache.pool.movers.NettyTransferService)7 IOException (java.io.IOException)5 URI (java.net.URI)4 URISyntaxException (java.net.URISyntaxException)4 UUID (java.util.UUID)4 FsPath (diskCacheV111.util.FsPath)3 HttpProtocolInfo (diskCacheV111.vehicles.HttpProtocolInfo)3 ByteBuf (io.netty.buffer.ByteBuf)3 DefaultLastHttpContent (io.netty.handler.codec.http.DefaultLastHttpContent)3 List (java.util.List)3 Futures (com.google.common.util.concurrent.Futures)2 HttpException (dmg.util.HttpException)2 Unpooled (io.netty.buffer.Unpooled)2 HttpContent (io.netty.handler.codec.http.HttpContent)2 ACCEPT_RANGES (io.netty.handler.codec.http.HttpHeaders.Names.ACCEPT_RANGES)2 CONTENT_LENGTH (io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_LENGTH)2 CONTENT_RANGE (io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_RANGE)2 CONTENT_TYPE (io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_TYPE)2 BYTES (io.netty.handler.codec.http.HttpHeaders.Values.BYTES)2 HttpRequest (io.netty.handler.codec.http.HttpRequest)2