Search in sources :

Example 6 with HttpExecutionStrategy

use of io.servicetalk.http.api.HttpExecutionStrategy in project servicetalk by apple.

the class ClientStrategyInfluencerChainBuilder method add.

void add(StreamingHttpConnectionFilterFactory connectionFilter) {
    HttpExecutionStrategy filterOffloads = connectionFilter.requiredOffloads();
    if (offloadNever() == filterOffloads) {
        LOGGER.warn("{}#requiredOffloads() returns offloadNever(), which is unexpected. " + "offloadNone() should be used instead. " + "Making automatic adjustment, consider updating the filter.", connectionFilter);
        filterOffloads = offloadNone();
    }
    if (defaultStrategy() == filterOffloads) {
        LOGGER.warn("{}#requiredOffloads() returns defaultStrategy(), which is unexpected. " + "offloadAll() (safe default) or more appropriate custom strategy should be used instead." + "Making automatic adjustment, consider updating the filter.", connectionFilter);
        filterOffloads = offloadAll();
    }
    if (filterOffloads.hasOffloads()) {
        connFilterChain = null != connFilterChain ? connFilterChain.merge(filterOffloads) : filterOffloads;
    }
}
Also used : ConnectAndHttpExecutionStrategy(io.servicetalk.http.api.ConnectAndHttpExecutionStrategy) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy)

Example 7 with HttpExecutionStrategy

use of io.servicetalk.http.api.HttpExecutionStrategy 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 8 with HttpExecutionStrategy

use of io.servicetalk.http.api.HttpExecutionStrategy in project servicetalk by apple.

the class DefaultMultiAddressUrlHttpClientBuilderTest method internalClientsUseDifferentExecutionContextWhenConfigured.

@Test
void internalClientsUseDifferentExecutionContextWhenConfigured() throws Exception {
    // Assert prerequisites first.
    // Use different strategies, as ExecutionContextExtension shares the same strategy.
    HttpExecutionStrategy internalExecutionStrategy = HttpExecutionStrategies.customStrategyBuilder().offloadNone().build();
    HttpExecutionStrategy externalExecutionStrategy = HttpExecutionStrategies.customStrategyBuilder().offloadAll().build();
    assertThat(internalExecutionStrategy, not(equalTo(externalExecutionStrategy)));
    BufferAllocator internalBufferAllocator = BufferAllocators.PREFER_DIRECT_ALLOCATOR;
    BufferAllocator externalBufferAllocator = BufferAllocators.PREFER_HEAP_ALLOCATOR;
    assertThat(internalBufferAllocator, not(equalTo(externalBufferAllocator)));
    assertThat(CTX.executor(), not(equalTo(INTERNAL_CLIENT_CTX.executor())));
    assertThat(CTX.ioExecutor(), not(equalTo(INTERNAL_CLIENT_CTX.ioExecutor())));
    try (ServerContext serverContext = HttpServers.forAddress(localAddress(0)).executionStrategy(offloadNever()).listenStreamingAndAwait((ctx, request, responseFactory) -> succeeded(responseFactory.ok()))) {
        AtomicReference<BufferAllocator> actualInternalBufferAllocator = new AtomicReference<>();
        AtomicReference<IoExecutor> actualInternalIoExecutor = new AtomicReference<>();
        AtomicReference<Executor> actualInternalExecutor = new AtomicReference<>();
        AtomicReference<ExecutionStrategy> actualInternalExecutionStrategy = new AtomicReference<>();
        final StreamingHttpClient streamingHttpClient = HttpClients.forMultiAddressUrl().initializer((scheme, address, builder) -> builder.executionStrategy(internalExecutionStrategy).executor(INTERNAL_CLIENT_CTX.executor()).ioExecutor(INTERNAL_CLIENT_CTX.ioExecutor()).bufferAllocator(internalBufferAllocator).executionStrategy(internalExecutionStrategy).appendClientFilter(client -> {
            HttpExecutionContext internalContext = client.executionContext();
            actualInternalBufferAllocator.set(internalContext.bufferAllocator());
            actualInternalExecutor.set(internalContext.executor());
            actualInternalIoExecutor.set(internalContext.ioExecutor());
            actualInternalExecutionStrategy.set(internalContext.executionStrategy());
            return new StreamingHttpClientFilter(client) {
            };
        })).executor(CTX.executor()).ioExecutor(CTX.ioExecutor()).executionStrategy(externalExecutionStrategy).bufferAllocator(externalBufferAllocator).buildStreaming();
        assertNotNull(streamingHttpClient);
        // Check external client
        final HttpExecutionContext executionContext = streamingHttpClient.executionContext();
        assertThat(executionContext.executor(), equalTo(CTX.executor()));
        assertThat(executionContext.executionStrategy(), equalTo(externalExecutionStrategy));
        assertThat(executionContext.ioExecutor(), equalTo(CTX.ioExecutor()));
        assertThat(executionContext.bufferAllocator(), equalTo(CTX.bufferAllocator()));
        // Make a request to trigger the filter execution that extracts the execution context.
        final HostAndPort address = HostAndPort.of((InetSocketAddress) serverContext.listenAddress());
        streamingHttpClient.reserveConnection(streamingHttpClient.get("http://" + address)).toFuture().get();
        // Check internal client
        assertThat(actualInternalBufferAllocator.get(), equalTo(internalBufferAllocator));
        assertThat(actualInternalExecutor.get(), equalTo(INTERNAL_CLIENT_CTX.executor()));
        assertThat(actualInternalIoExecutor.get(), equalTo(INTERNAL_CLIENT_CTX.ioExecutor()));
        assertThat(actualInternalExecutionStrategy.get(), equalTo(internalExecutionStrategy));
        streamingHttpClient.closeAsync().toFuture().get();
    }
}
Also used : Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Matchers.not(org.hamcrest.Matchers.not) ExecutionContextExtension.cached(io.servicetalk.transport.netty.internal.ExecutionContextExtension.cached) StreamingHttpRequester(io.servicetalk.http.api.StreamingHttpRequester) ServiceDiscovererEvent(io.servicetalk.client.api.ServiceDiscovererEvent) AtomicReference(java.util.concurrent.atomic.AtomicReference) HttpRequester(io.servicetalk.http.api.HttpRequester) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) ExecutionStrategy(io.servicetalk.transport.api.ExecutionStrategy) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HttpExecutionStrategies(io.servicetalk.http.api.HttpExecutionStrategies) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) Executor(io.servicetalk.concurrent.api.Executor) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) HttpExecutionContext(io.servicetalk.http.api.HttpExecutionContext) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ExecutionContextExtension.immediate(io.servicetalk.transport.netty.internal.ExecutionContextExtension.immediate) ServerContext(io.servicetalk.transport.api.ServerContext) ServiceDiscoverer(io.servicetalk.client.api.ServiceDiscoverer) ExecutionContextExtension(io.servicetalk.transport.netty.internal.ExecutionContextExtension) BlockingHttpRequester(io.servicetalk.http.api.BlockingHttpRequester) BlockingStreamingHttpRequester(io.servicetalk.http.api.BlockingStreamingHttpRequester) StreamingHttpClientFilter(io.servicetalk.http.api.StreamingHttpClientFilter) InetSocketAddress(java.net.InetSocketAddress) Mockito.verify(org.mockito.Mockito.verify) BufferAllocators(io.servicetalk.buffer.netty.BufferAllocators) Test(org.junit.jupiter.api.Test) IoExecutor(io.servicetalk.transport.api.IoExecutor) Mockito.never(org.mockito.Mockito.never) BufferAllocator(io.servicetalk.buffer.api.BufferAllocator) Matchers.equalTo(org.hamcrest.Matchers.equalTo) HostAndPort(io.servicetalk.transport.api.HostAndPort) HttpExecutionStrategies.offloadNever(io.servicetalk.http.api.HttpExecutionStrategies.offloadNever) Mockito.mock(org.mockito.Mockito.mock) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) IoExecutor(io.servicetalk.transport.api.IoExecutor) AtomicReference(java.util.concurrent.atomic.AtomicReference) BufferAllocator(io.servicetalk.buffer.api.BufferAllocator) StreamingHttpClientFilter(io.servicetalk.http.api.StreamingHttpClientFilter) HostAndPort(io.servicetalk.transport.api.HostAndPort) Executor(io.servicetalk.concurrent.api.Executor) IoExecutor(io.servicetalk.transport.api.IoExecutor) ServerContext(io.servicetalk.transport.api.ServerContext) HttpExecutionContext(io.servicetalk.http.api.HttpExecutionContext) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) ExecutionStrategy(io.servicetalk.transport.api.ExecutionStrategy) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) Test(org.junit.jupiter.api.Test)

Example 9 with HttpExecutionStrategy

use of io.servicetalk.http.api.HttpExecutionStrategy in project servicetalk by apple.

the class ExecutionStrategyInContextTest method testAsync.

@ParameterizedTest(name = "customStrategy={0}")
@ValueSource(booleans = { false, true })
void testAsync(boolean customStrategy) throws Exception {
    HttpClient client = initClientAndServer(builder -> builder.listen((ctx, request, responseFactory) -> {
        serviceStrategyRef.set(ctx.executionContext().executionStrategy());
        return succeeded(responseFactory.ok());
    }), customStrategy).build();
    clientAsCloseable = client;
    if (!customStrategy) {
        assert expectedClientStrategy == null;
        expectedClientStrategy = customStrategyBuilder().offloadReceiveData().offloadEvent().build();
        assert expectedServerStrategy == null;
        expectedServerStrategy = customStrategyBuilder().offloadReceiveData().offloadSend().build();
    }
    HttpExecutionStrategy clientStrat = client.executionContext().executionStrategy();
    assertThat("Unexpected client strategy.", clientStrat, equalStrategies(expectedClientStrategy));
    client.request(client.get("/")).toFuture().get();
    assertThat("Unexpected service strategy", serviceStrategyRef.get(), equalStrategies(expectedServerStrategy));
    ReservedHttpConnection conn = client.reserveConnection(client.get("/")).toFuture().get();
    assertThat("Unexpected connection strategy (from execution context).", conn.executionContext().executionStrategy(), equalStrategies(expectedClientStrategy));
    assertThat("Unexpected connection strategy (from execution context).", conn.connectionContext().executionContext().executionStrategy(), equalStrategies(expectedClientStrategy));
}
Also used : AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HttpExecutionStrategies(io.servicetalk.http.api.HttpExecutionStrategies) HttpServerContext(io.servicetalk.http.api.HttpServerContext) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) HttpClient(io.servicetalk.http.api.HttpClient) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ReservedHttpConnection(io.servicetalk.http.api.ReservedHttpConnection) HttpServerBuilder(io.servicetalk.http.api.HttpServerBuilder) Nullable(javax.annotation.Nullable) BlockingHttpClient(io.servicetalk.http.api.BlockingHttpClient) ReservedBlockingStreamingHttpConnection(io.servicetalk.http.api.ReservedBlockingStreamingHttpConnection) ValueSource(org.junit.jupiter.params.provider.ValueSource) Description(org.hamcrest.Description) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ServerContext(io.servicetalk.transport.api.ServerContext) Single(io.servicetalk.concurrent.api.Single) HttpClients.forSingleAddress(io.servicetalk.http.netty.HttpClients.forSingleAddress) ReservedBlockingHttpConnection(io.servicetalk.http.api.ReservedBlockingHttpConnection) TypeSafeMatcher(org.hamcrest.TypeSafeMatcher) InetSocketAddress(java.net.InetSocketAddress) BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient) SingleAddressHttpClientBuilder(io.servicetalk.http.api.SingleAddressHttpClientBuilder) Objects(java.util.Objects) HttpExecutionStrategies.customStrategyBuilder(io.servicetalk.http.api.HttpExecutionStrategies.customStrategyBuilder) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Matcher(org.hamcrest.Matcher) ReservedStreamingHttpConnection(io.servicetalk.http.api.ReservedStreamingHttpConnection) HostAndPort(io.servicetalk.transport.api.HostAndPort) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) HttpClient(io.servicetalk.http.api.HttpClient) BlockingHttpClient(io.servicetalk.http.api.BlockingHttpClient) BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) ReservedHttpConnection(io.servicetalk.http.api.ReservedHttpConnection) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 10 with HttpExecutionStrategy

use of io.servicetalk.http.api.HttpExecutionStrategy in project servicetalk by apple.

the class ExecutionStrategyInContextTest method testBlockingStreaming.

@ParameterizedTest(name = "customStrategy={0}")
@ValueSource(booleans = { false, true })
void testBlockingStreaming(boolean customStrategy) throws Exception {
    BlockingStreamingHttpClient client = initClientAndServer(builder -> {
        if (customStrategy) {
            // Ensure we don't deadlock by not offloading receive meta
            expectedServerStrategy = customStrategyBuilder().offloadReceiveMetadata().build();
            builder.executionStrategy(expectedServerStrategy);
        }
        return builder.listenBlockingStreaming((ctx, request, response) -> {
            serviceStrategyRef.set(ctx.executionContext().executionStrategy());
            response.sendMetaData().close();
        });
    }, customStrategy).buildBlockingStreaming();
    clientAsCloseable = client;
    if (!customStrategy) {
        assert expectedClientStrategy == null;
        expectedClientStrategy = customStrategyBuilder().offloadSend().offloadEvent().build();
        assert expectedServerStrategy == null;
        expectedServerStrategy = customStrategyBuilder().offloadReceiveMetadata().build();
    }
    HttpExecutionStrategy clientStrat = client.executionContext().executionStrategy();
    assertThat("Unexpected client strategy.", clientStrat, equalStrategies(expectedClientStrategy));
    client.request(client.get("/"));
    assertThat("Unexpected service strategy", serviceStrategyRef.get(), equalStrategies(expectedServerStrategy));
    ReservedBlockingStreamingHttpConnection conn = client.reserveConnection(client.get("/"));
    assertThat("Unexpected connection strategy (from execution context).", conn.executionContext().executionStrategy(), equalStrategies(expectedClientStrategy));
    assertThat("Unexpected connection strategy (from execution context).", conn.connectionContext().executionContext().executionStrategy(), equalStrategies(expectedClientStrategy));
}
Also used : AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HttpExecutionStrategies(io.servicetalk.http.api.HttpExecutionStrategies) HttpServerContext(io.servicetalk.http.api.HttpServerContext) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) HttpClient(io.servicetalk.http.api.HttpClient) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ReservedHttpConnection(io.servicetalk.http.api.ReservedHttpConnection) HttpServerBuilder(io.servicetalk.http.api.HttpServerBuilder) Nullable(javax.annotation.Nullable) BlockingHttpClient(io.servicetalk.http.api.BlockingHttpClient) ReservedBlockingStreamingHttpConnection(io.servicetalk.http.api.ReservedBlockingStreamingHttpConnection) ValueSource(org.junit.jupiter.params.provider.ValueSource) Description(org.hamcrest.Description) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ServerContext(io.servicetalk.transport.api.ServerContext) Single(io.servicetalk.concurrent.api.Single) HttpClients.forSingleAddress(io.servicetalk.http.netty.HttpClients.forSingleAddress) ReservedBlockingHttpConnection(io.servicetalk.http.api.ReservedBlockingHttpConnection) TypeSafeMatcher(org.hamcrest.TypeSafeMatcher) InetSocketAddress(java.net.InetSocketAddress) BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient) SingleAddressHttpClientBuilder(io.servicetalk.http.api.SingleAddressHttpClientBuilder) Objects(java.util.Objects) HttpExecutionStrategies.customStrategyBuilder(io.servicetalk.http.api.HttpExecutionStrategies.customStrategyBuilder) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Matcher(org.hamcrest.Matcher) ReservedStreamingHttpConnection(io.servicetalk.http.api.ReservedStreamingHttpConnection) HostAndPort(io.servicetalk.transport.api.HostAndPort) BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient) ReservedBlockingStreamingHttpConnection(io.servicetalk.http.api.ReservedBlockingStreamingHttpConnection) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

HttpExecutionStrategy (io.servicetalk.http.api.HttpExecutionStrategy)23 Single.succeeded (io.servicetalk.concurrent.api.Single.succeeded)9 StreamingHttpClient (io.servicetalk.http.api.StreamingHttpClient)9 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 Nullable (javax.annotation.Nullable)8 Single (io.servicetalk.concurrent.api.Single)7 HttpExecutionStrategies.defaultStrategy (io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy)7 HostAndPort (io.servicetalk.transport.api.HostAndPort)7 ServerContext (io.servicetalk.transport.api.ServerContext)7 AddressUtils.localAddress (io.servicetalk.transport.netty.internal.AddressUtils.localAddress)7 AddressUtils.serverHostAndPort (io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort)7 InetSocketAddress (java.net.InetSocketAddress)7 AtomicReference (java.util.concurrent.atomic.AtomicReference)7 HttpExecutionContext (io.servicetalk.http.api.HttpExecutionContext)6 StreamingHttpResponse (io.servicetalk.http.api.StreamingHttpResponse)6 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)6 AfterEach (org.junit.jupiter.api.AfterEach)6 HttpExecutionStrategies (io.servicetalk.http.api.HttpExecutionStrategies)5 ReservedStreamingHttpConnection (io.servicetalk.http.api.ReservedStreamingHttpConnection)5 ValueSource (org.junit.jupiter.params.provider.ValueSource)5