Search in sources :

Example 1 with HEAD

use of javax.ws.rs.HttpMethod.HEAD in project servicetalk by apple.

the class DefaultContainerResponseWriter method sendResponse.

private void sendResponse(final long contentLength, @Nullable final Publisher<Buffer> content, final ContainerResponse containerResponse) {
    final HttpResponseStatus status = getStatus(containerResponse);
    final StreamingHttpResponse response;
    if (content != null && !isHeadRequest()) {
        final HttpExecutionStrategy executionStrategy = getResponseExecutionStrategy(request);
        // TODO(scott): use request factory methods that accept a payload body to avoid overhead of payloadBody.
        final Publisher<Buffer> payloadBody = (executionStrategy != null && executionStrategy.isSendOffloaded() ? content.subscribeOn(serviceCtx.executionContext().executor(), IoThreadFactory.IoThread::currentThreadIsIoThread) : content).beforeCancel(// Cleanup internal state if server cancels response body
        this::cancelResponse);
        response = responseFactory.newResponse(status).version(protocolVersion).payloadBody(payloadBody);
    } else {
        response = responseFactory.newResponse(status).version(protocolVersion);
    }
    final HttpHeaders headers = response.headers();
    // If we use HTTP/2 protocol all headers MUST be in lower case
    final boolean isH2 = response.version().major() == 2;
    containerResponse.getHeaders().forEach((k, vs) -> vs.forEach(v -> {
        headers.add(isH2 ? k.toLowerCase() : k, v == null ? emptyAsciiString() : asCharSequence(v));
    }));
    if (!headers.contains(CONTENT_LENGTH)) {
        if (contentLength == UNKNOWN_RESPONSE_LENGTH) {
            // We can omit Transfer-Encoding for HEAD per https://tools.ietf.org/html/rfc7231#section-4.3.2
            if (!isHeadRequest() && !HTTP_1_0.equals(protocolVersion)) {
                headers.set(TRANSFER_ENCODING, CHUNKED);
            }
        } else {
            headers.set(CONTENT_LENGTH, contentLength == 0 ? ZERO : Long.toString(contentLength));
            headers.removeIgnoreCase(TRANSFER_ENCODING, CHUNKED);
        }
    }
    responseSubscriber.onSuccess(response);
}
Also used : Buffer(io.servicetalk.buffer.api.Buffer) AtomicIntegerFieldUpdater(java.util.concurrent.atomic.AtomicIntegerFieldUpdater) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) Publisher(io.servicetalk.concurrent.api.Publisher) Subscriber(io.servicetalk.concurrent.SingleSource.Subscriber) LoggerFactory(org.slf4j.LoggerFactory) HttpHeaders(io.servicetalk.http.api.HttpHeaders) Cancellable(io.servicetalk.concurrent.Cancellable) RequestProperties.getResponseExecutionStrategy(io.servicetalk.http.router.jersey.internal.RequestProperties.getResponseExecutionStrategy) ConnectableBufferOutputStream(io.servicetalk.concurrent.api.internal.ConnectableBufferOutputStream) RequestProperties.getResponseBufferPublisher(io.servicetalk.http.router.jersey.internal.RequestProperties.getResponseBufferPublisher) ContainerException(org.glassfish.jersey.server.ContainerException) ZERO(io.servicetalk.http.api.HttpHeaderValues.ZERO) HttpServiceContext(io.servicetalk.http.api.HttpServiceContext) IoThreadFactory(io.servicetalk.transport.api.IoThreadFactory) RequestProperties.getRequestCancellable(io.servicetalk.http.router.jersey.internal.RequestProperties.getRequestCancellable) Collectors.toMap(java.util.stream.Collectors.toMap) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) HttpProtocolVersion(io.servicetalk.http.api.HttpProtocolVersion) CharSequences.emptyAsciiString(io.servicetalk.buffer.api.CharSequences.emptyAsciiString) AtomicIntegerFieldUpdater.newUpdater(java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater) Status(javax.ws.rs.core.Response.Status) ContainerResponseWriter(org.glassfish.jersey.server.spi.ContainerResponseWriter) Nullable(javax.annotation.Nullable) CHUNKED(io.servicetalk.http.api.HttpHeaderValues.CHUNKED) OutputStream(java.io.OutputStream) Logger(org.slf4j.Logger) TRANSFER_ENCODING(io.servicetalk.http.api.HttpHeaderNames.TRANSFER_ENCODING) IOException(java.io.IOException) ContainerRequest(org.glassfish.jersey.server.ContainerRequest) CONTENT_LENGTH(io.servicetalk.http.api.HttpHeaderNames.CONTENT_LENGTH) TimeUnit(java.util.concurrent.TimeUnit) StatusType(javax.ws.rs.core.Response.StatusType) ContainerResponse(org.glassfish.jersey.server.ContainerResponse) HEAD(javax.ws.rs.HttpMethod.HEAD) Buffer(io.servicetalk.buffer.api.Buffer) StreamingHttpResponseFactory(io.servicetalk.http.api.StreamingHttpResponseFactory) Function.identity(java.util.function.Function.identity) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) Arrays.stream(java.util.Arrays.stream) HttpResponseStatus(io.servicetalk.http.api.HttpResponseStatus) System.arraycopy(java.lang.System.arraycopy) HTTP_1_0(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_0) HttpHeaders(io.servicetalk.http.api.HttpHeaders) HttpResponseStatus(io.servicetalk.http.api.HttpResponseStatus) IoThreadFactory(io.servicetalk.transport.api.IoThreadFactory) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse)

Example 2 with HEAD

use of javax.ws.rs.HttpMethod.HEAD in project trellis by trellis-ldp.

the class MementoResource method getTimeMapBuilder.

/**
 * Create a response builder for a TimeMap response.
 *
 * @param mementos the mementos
 * @param baseUrl the base URL
 * @param req the LDP request
 * @return a response builder object
 */
public ResponseBuilder getTimeMapBuilder(final SortedSet<Instant> mementos, final TrellisRequest req, final String baseUrl) {
    final List<MediaType> acceptableTypes = req.getAcceptableMediaTypes();
    final String identifier = HttpUtils.buildResourceUrl(req, baseUrl);
    final List<Link> allLinks = getMementoLinks(identifier, mementos).collect(toList());
    final ResponseBuilder builder = ok().link(identifier, ORIGINAL + " " + TIMEGATE);
    builder.links(getMementoHeaders(identifier, mementos).map(this::filterLinkParams).toArray(Link[]::new)).link(Resource.getIRIString(), TYPE).link(RDFSource.getIRIString(), TYPE).header(ALLOW, join(",", GET, HEAD, OPTIONS));
    final RDFSyntax syntax = getSyntax(trellis.getIOService(), acceptableTypes, APPLICATION_LINK_FORMAT);
    if (syntax != null) {
        final IRI profile = getProfile(acceptableTypes, syntax);
        final IRI jsonldProfile = profile != null ? profile : compacted;
        return builder.type(syntax.mediaType()).entity((StreamingOutput) out -> trellis.getIOService().write(trellis.getTimemapGenerator().asRdf(identifier, allLinks), out, syntax, baseUrl, jsonldProfile));
    }
    return builder.type(APPLICATION_LINK_FORMAT).entity(allLinks.stream().map(this::filterLinkParams).map(Link::toString).collect(joining(",\n")) + "\n");
}
Also used : Stream.empty(java.util.stream.Stream.empty) DATETIME(org.trellisldp.common.HttpConstants.DATETIME) HttpUtils.getProfile(org.trellisldp.http.impl.HttpUtils.getProfile) SortedSet(java.util.SortedSet) GET(javax.ws.rs.HttpMethod.GET) ServiceBundler(org.trellisldp.common.ServiceBundler) UriBuilder.fromUri(javax.ws.rs.core.UriBuilder.fromUri) Resource(org.trellisldp.vocabulary.LDP.Resource) ALLOW(javax.ws.rs.core.HttpHeaders.ALLOW) ORIGINAL(org.trellisldp.common.HttpConstants.ORIGINAL) Collections.singletonList(java.util.Collections.singletonList) TIMEMAP(org.trellisldp.common.HttpConstants.TIMEMAP) HttpUtils.getSyntax(org.trellisldp.http.impl.HttpUtils.getSyntax) MediaType(javax.ws.rs.core.MediaType) String.join(java.lang.String.join) FROM(org.trellisldp.common.HttpConstants.FROM) UNTIL(org.trellisldp.common.HttpConstants.UNTIL) RDFSource(org.trellisldp.vocabulary.LDP.RDFSource) Arrays.asList(java.util.Arrays.asList) OPTIONS(javax.ws.rs.HttpMethod.OPTIONS) Response.status(javax.ws.rs.core.Response.status) Stream.concat(java.util.stream.Stream.concat) TYPE(javax.ws.rs.core.Link.TYPE) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) JSONLD.compacted(org.trellisldp.vocabulary.JSONLD.compacted) SECONDS(java.time.temporal.ChronoUnit.SECONDS) TrellisRequest(org.trellisldp.common.TrellisRequest) ZonedDateTime.ofInstant(java.time.ZonedDateTime.ofInstant) Iterator(java.util.Iterator) Collections.emptyList(java.util.Collections.emptyList) Stream.of(java.util.stream.Stream.of) APPLICATION_LINK_FORMAT(org.trellisldp.common.HttpConstants.APPLICATION_LINK_FORMAT) StreamingOutput(javax.ws.rs.core.StreamingOutput) FOUND(javax.ws.rs.core.Response.Status.FOUND) Instant(java.time.Instant) Collectors.joining(java.util.stream.Collectors.joining) Collectors.toList(java.util.stream.Collectors.toList) HEAD(javax.ws.rs.HttpMethod.HEAD) List(java.util.List) IRI(org.apache.commons.rdf.api.IRI) TIMEGATE(org.trellisldp.common.HttpConstants.TIMEGATE) Stream(java.util.stream.Stream) RDFSyntax(org.apache.commons.rdf.api.RDFSyntax) Response.ok(javax.ws.rs.core.Response.ok) UTC(java.time.ZoneOffset.UTC) RFC_1123_DATE_TIME(java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME) Link(javax.ws.rs.core.Link) MEMENTO(org.trellisldp.common.HttpConstants.MEMENTO) IRI(org.apache.commons.rdf.api.IRI) MediaType(javax.ws.rs.core.MediaType) RDFSyntax(org.apache.commons.rdf.api.RDFSyntax) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) Link(javax.ws.rs.core.Link)

Example 3 with HEAD

use of javax.ws.rs.HttpMethod.HEAD in project trellis by trellis-ldp.

the class GetHandler method getLdpNr.

private CompletionStage<ResponseBuilder> getLdpNr(final ResponseBuilder builder) {
    final EntityTag etag = generateEtag(getResource().getRevision());
    checkCache(getResource().getModified(), etag);
    final IRI dsid = getResource().getBinaryMetadata().map(BinaryMetadata::getIdentifier).orElse(null);
    // Add standard headers
    builder.header(ACCEPT_RANGES, "bytes").tag(etag);
    addAllowHeaders(builder);
    // Short circuit HEAD requests
    if (HEAD.equals(getRequest().getMethod())) {
        return completedFuture(builder);
    }
    // Stream the binary content
    return getBinaryStream(dsid, getRequest()).thenApply(in -> (StreamingOutput) out -> copy(in, out)).thenApply(builder::entity);
}
Also used : DELETE(javax.ws.rs.HttpMethod.DELETE) HttpUtils.getProfile(org.trellisldp.http.impl.HttpUtils.getProfile) RedirectionException(javax.ws.rs.RedirectionException) HttpUtils.getDefaultProfile(org.trellisldp.http.impl.HttpUtils.getDefaultProfile) SortedSet(java.util.SortedSet) GET(javax.ws.rs.HttpMethod.GET) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) ACCEPT_POST(org.trellisldp.common.HttpConstants.ACCEPT_POST) HttpUtils.unskolemizeTriples(org.trellisldp.http.impl.HttpUtils.unskolemizeTriples) WILDCARD(javax.ws.rs.core.MediaType.WILDCARD) ALLOW(javax.ws.rs.core.HttpHeaders.ALLOW) HttpUtils.ldpResourceTypes(org.trellisldp.http.impl.HttpUtils.ldpResourceTypes) Prefer(org.trellisldp.common.Prefer) ACCEPT_DATETIME(org.trellisldp.common.HttpConstants.ACCEPT_DATETIME) ClientErrorException(javax.ws.rs.ClientErrorException) Resource(org.trellisldp.api.Resource) HttpUtils.getSyntax(org.trellisldp.http.impl.HttpUtils.getSyntax) Collectors.toMap(java.util.stream.Collectors.toMap) APPLICATION_OCTET_STREAM(javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM) Map(java.util.Map) UriBuilder(javax.ws.rs.core.UriBuilder) DELETED_RESOURCE(org.trellisldp.api.Resource.SpecialResources.DELETED_RESOURCE) PREFER(org.trellisldp.common.HttpConstants.PREFER) RANGE(org.trellisldp.common.HttpConstants.RANGE) PATCH(javax.ws.rs.HttpMethod.PATCH) Set(java.util.Set) StreamingOutput(javax.ws.rs.core.StreamingOutput) HttpUtils.isContainer(org.trellisldp.http.impl.HttpUtils.isContainer) Instant(java.time.Instant) Collectors.joining(java.util.stream.Collectors.joining) NotFoundException(javax.ws.rs.NotFoundException) ACCEPT_RANGES(org.trellisldp.common.HttpConstants.ACCEPT_RANGES) VARY(javax.ws.rs.core.HttpHeaders.VARY) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) ORIGIN(org.trellisldp.common.HttpConstants.ORIGIN) POST(javax.ws.rs.HttpMethod.POST) Response.ok(javax.ws.rs.core.Response.ok) PUT(javax.ws.rs.HttpMethod.PUT) Link(javax.ws.rs.core.Link) PREFER_RETURN(org.trellisldp.common.Prefer.PREFER_RETURN) ServiceBundler(org.trellisldp.common.ServiceBundler) Binary(org.trellisldp.api.Binary) TrellisUtils.normalizePath(org.trellisldp.api.TrellisUtils.normalizePath) ArrayList(java.util.ArrayList) PREFERENCE_APPLIED(org.trellisldp.common.HttpConstants.PREFERENCE_APPLIED) MEMENTO_DATETIME(org.trellisldp.common.HttpConstants.MEMENTO_DATETIME) String.join(java.lang.String.join) PREFER_MINIMAL(org.trellisldp.common.Prefer.PREFER_MINIMAL) GONE(javax.ws.rs.core.Response.Status.GONE) Date.from(java.util.Date.from) OPTIONS(javax.ws.rs.HttpMethod.OPTIONS) ACCEPT_PATCH(org.trellisldp.common.HttpConstants.ACCEPT_PATCH) Stream.concat(java.util.stream.Stream.concat) LDP(org.trellisldp.vocabulary.LDP) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) PREFER_REPRESENTATION(org.trellisldp.common.Prefer.PREFER_REPRESENTATION) OutputStream(java.io.OutputStream) BinaryMetadata(org.trellisldp.api.BinaryMetadata) TrellisRequest(org.trellisldp.common.TrellisRequest) NotAcceptableException(javax.ws.rs.NotAcceptableException) Logger(org.slf4j.Logger) DESCRIPTION(org.trellisldp.common.HttpConstants.DESCRIPTION) Stream.of(java.util.stream.Stream.of) NO_CONTENT(javax.ws.rs.core.Response.Status.NO_CONTENT) IOException(java.io.IOException) EntityTag(javax.ws.rs.core.EntityTag) HEAD(javax.ws.rs.HttpMethod.HEAD) IRI(org.apache.commons.rdf.api.IRI) Quad(org.apache.commons.rdf.api.Quad) RDFSyntax(org.apache.commons.rdf.api.RDFSyntax) Version(org.trellisldp.common.Version) ACCEPT(javax.ws.rs.core.HttpHeaders.ACCEPT) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) HttpUtils.triplePreferences(org.trellisldp.http.impl.HttpUtils.triplePreferences) MISSING_RESOURCE(org.trellisldp.api.Resource.SpecialResources.MISSING_RESOURCE) InputStream(java.io.InputStream) IRI(org.apache.commons.rdf.api.IRI) EntityTag(javax.ws.rs.core.EntityTag) StreamingOutput(javax.ws.rs.core.StreamingOutput)

Example 4 with HEAD

use of javax.ws.rs.HttpMethod.HEAD in project trellis by trellis-ldp.

the class GetHandler method getLdpRs.

private ResponseBuilder getLdpRs(final ResponseBuilder builder, final RDFSyntax syntax, final IRI profile) {
    final Prefer prefer = getRequest().getPrefer();
    // Check for a cache hit
    if (!RDFSyntax.RDFA.equals(syntax)) {
        final EntityTag etag = generateEtag(getResource().getRevision(), weakEtags);
        checkCache(getResource().getModified(), etag);
        builder.tag(etag);
    }
    addAllowHeaders(builder);
    if (prefer != null) {
        builder.header(PREFERENCE_APPLIED, PREFER_RETURN + "=" + prefer.getPreference().orElse(PREFER_REPRESENTATION));
        if (prefer.getPreference().filter(PREFER_MINIMAL::equals).isPresent()) {
            return builder.status(NO_CONTENT);
        }
    }
    // Short circuit HEAD requests
    if (HEAD.equals(getRequest().getMethod())) {
        return builder;
    }
    // Stream the rdf content
    return builder.entity((StreamingOutput) out -> {
        try (final Stream<Quad> stream = getResource().stream(getPreferredGraphs(prefer))) {
            getServices().getIOService().write(stream.map(Quad::asTriple).map(unskolemizeTriples(getServices().getResourceService(), getBaseUrl())), out, syntax, getIdentifier(), getJsonLdProfile(profile, syntax));
        }
    });
}
Also used : DELETE(javax.ws.rs.HttpMethod.DELETE) HttpUtils.getProfile(org.trellisldp.http.impl.HttpUtils.getProfile) RedirectionException(javax.ws.rs.RedirectionException) HttpUtils.getDefaultProfile(org.trellisldp.http.impl.HttpUtils.getDefaultProfile) SortedSet(java.util.SortedSet) GET(javax.ws.rs.HttpMethod.GET) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) ACCEPT_POST(org.trellisldp.common.HttpConstants.ACCEPT_POST) HttpUtils.unskolemizeTriples(org.trellisldp.http.impl.HttpUtils.unskolemizeTriples) WILDCARD(javax.ws.rs.core.MediaType.WILDCARD) ALLOW(javax.ws.rs.core.HttpHeaders.ALLOW) HttpUtils.ldpResourceTypes(org.trellisldp.http.impl.HttpUtils.ldpResourceTypes) Prefer(org.trellisldp.common.Prefer) ACCEPT_DATETIME(org.trellisldp.common.HttpConstants.ACCEPT_DATETIME) ClientErrorException(javax.ws.rs.ClientErrorException) Resource(org.trellisldp.api.Resource) HttpUtils.getSyntax(org.trellisldp.http.impl.HttpUtils.getSyntax) Collectors.toMap(java.util.stream.Collectors.toMap) APPLICATION_OCTET_STREAM(javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM) Map(java.util.Map) UriBuilder(javax.ws.rs.core.UriBuilder) DELETED_RESOURCE(org.trellisldp.api.Resource.SpecialResources.DELETED_RESOURCE) PREFER(org.trellisldp.common.HttpConstants.PREFER) RANGE(org.trellisldp.common.HttpConstants.RANGE) PATCH(javax.ws.rs.HttpMethod.PATCH) Set(java.util.Set) StreamingOutput(javax.ws.rs.core.StreamingOutput) HttpUtils.isContainer(org.trellisldp.http.impl.HttpUtils.isContainer) Instant(java.time.Instant) Collectors.joining(java.util.stream.Collectors.joining) NotFoundException(javax.ws.rs.NotFoundException) ACCEPT_RANGES(org.trellisldp.common.HttpConstants.ACCEPT_RANGES) VARY(javax.ws.rs.core.HttpHeaders.VARY) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) ORIGIN(org.trellisldp.common.HttpConstants.ORIGIN) POST(javax.ws.rs.HttpMethod.POST) Response.ok(javax.ws.rs.core.Response.ok) PUT(javax.ws.rs.HttpMethod.PUT) Link(javax.ws.rs.core.Link) PREFER_RETURN(org.trellisldp.common.Prefer.PREFER_RETURN) ServiceBundler(org.trellisldp.common.ServiceBundler) Binary(org.trellisldp.api.Binary) TrellisUtils.normalizePath(org.trellisldp.api.TrellisUtils.normalizePath) ArrayList(java.util.ArrayList) PREFERENCE_APPLIED(org.trellisldp.common.HttpConstants.PREFERENCE_APPLIED) MEMENTO_DATETIME(org.trellisldp.common.HttpConstants.MEMENTO_DATETIME) String.join(java.lang.String.join) PREFER_MINIMAL(org.trellisldp.common.Prefer.PREFER_MINIMAL) GONE(javax.ws.rs.core.Response.Status.GONE) Date.from(java.util.Date.from) OPTIONS(javax.ws.rs.HttpMethod.OPTIONS) ACCEPT_PATCH(org.trellisldp.common.HttpConstants.ACCEPT_PATCH) Stream.concat(java.util.stream.Stream.concat) LDP(org.trellisldp.vocabulary.LDP) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) PREFER_REPRESENTATION(org.trellisldp.common.Prefer.PREFER_REPRESENTATION) OutputStream(java.io.OutputStream) BinaryMetadata(org.trellisldp.api.BinaryMetadata) TrellisRequest(org.trellisldp.common.TrellisRequest) NotAcceptableException(javax.ws.rs.NotAcceptableException) Logger(org.slf4j.Logger) DESCRIPTION(org.trellisldp.common.HttpConstants.DESCRIPTION) Stream.of(java.util.stream.Stream.of) NO_CONTENT(javax.ws.rs.core.Response.Status.NO_CONTENT) IOException(java.io.IOException) EntityTag(javax.ws.rs.core.EntityTag) HEAD(javax.ws.rs.HttpMethod.HEAD) IRI(org.apache.commons.rdf.api.IRI) Quad(org.apache.commons.rdf.api.Quad) RDFSyntax(org.apache.commons.rdf.api.RDFSyntax) Version(org.trellisldp.common.Version) ACCEPT(javax.ws.rs.core.HttpHeaders.ACCEPT) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) HttpUtils.triplePreferences(org.trellisldp.http.impl.HttpUtils.triplePreferences) MISSING_RESOURCE(org.trellisldp.api.Resource.SpecialResources.MISSING_RESOURCE) InputStream(java.io.InputStream) Prefer(org.trellisldp.common.Prefer) EntityTag(javax.ws.rs.core.EntityTag) Stream(java.util.stream.Stream) OutputStream(java.io.OutputStream) InputStream(java.io.InputStream)

Aggregations

HEAD (javax.ws.rs.HttpMethod.HEAD)4 IOException (java.io.IOException)3 OutputStream (java.io.OutputStream)3 String.join (java.lang.String.join)3 Instant (java.time.Instant)3 List (java.util.List)3 Map (java.util.Map)3 SortedSet (java.util.SortedSet)3 Collectors.joining (java.util.stream.Collectors.joining)3 Collectors.toMap (java.util.stream.Collectors.toMap)3 Stream (java.util.stream.Stream)3 Stream.concat (java.util.stream.Stream.concat)3 Stream.of (java.util.stream.Stream.of)3 GET (javax.ws.rs.HttpMethod.GET)3 OPTIONS (javax.ws.rs.HttpMethod.OPTIONS)3 ALLOW (javax.ws.rs.core.HttpHeaders.ALLOW)3 Link (javax.ws.rs.core.Link)3 ResponseBuilder (javax.ws.rs.core.Response.ResponseBuilder)3 Response.ok (javax.ws.rs.core.Response.ok)3 StreamingOutput (javax.ws.rs.core.StreamingOutput)3