Add Javadocs.

This commit is contained in:
Olga Maciaszek-Sharma
2022-04-21 15:18:20 +02:00
parent 3bfc291d77
commit c13ee2c884
5 changed files with 14 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.springframework.util.concurrent.ListenableFuture;
/**
* @author Rob Worsnop
* @author Olga Maciaszek-Sharma
*/
public class AsyncLoadBalancerInterceptor implements AsyncClientHttpRequestInterceptor {
@@ -41,7 +42,7 @@ public class AsyncLoadBalancerInterceptor implements AsyncClientHttpRequestInter
final AsyncClientHttpRequestExecution execution) throws IOException {
final URI originalUri = request.getURI();
String serviceName = originalUri.getHost();
return this.loadBalancer.execute(serviceName, new DefaultAsyncLoadBalancerRequest(loadBalancer,
return loadBalancer.execute(serviceName, new DefaultAsyncLoadBalancerRequest(loadBalancer,
new DefaultAsyncLoadBalancerRequest.ClientHttpRequestData(request, body, execution)));
}

View File

@@ -23,7 +23,10 @@ import org.springframework.http.client.ClientHttpResponse;
import org.springframework.util.concurrent.ListenableFuture;
/**
* Default {@link LoadBalancerRequest} implementation for async use-cases.
*
* @author Olga Maciaszek-Sharma
* @since 3.1.2
*/
class DefaultAsyncLoadBalancerRequest implements HttpRequestLoadBalancerRequest<ListenableFuture<ClientHttpResponse>> {

View File

@@ -24,7 +24,10 @@ import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpResponse;
/**
* Default {@link LoadBalancerRequest} implementation.
*
* @author Olga Maciaszek-Sharma
* @since 3.1.2
*/
class DefaultLoadBalancerRequest implements HttpRequestLoadBalancerRequest<ClientHttpResponse> {

View File

@@ -19,7 +19,10 @@ package org.springframework.cloud.client.loadbalancer;
import org.springframework.http.HttpRequest;
/**
* Represents a {@link LoadBalancerRequest} created on top of an {@link HttpRequest}.
*
* @author Olga Maciaszek-Sharma
* @since 3.1.2
*/
public interface HttpRequestLoadBalancerRequest<T> extends LoadBalancerRequest<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@ import org.springframework.http.client.ClientHttpResponse;
* to the intercepted {@link HttpRequest}.
*
* @author William Tran
* @author Olga Maciaszek-Sharma
*
*/
public class LoadBalancerRequestFactory {