Browse Source

Add Javadocs.

pull/1100/head
Olga Maciaszek-Sharma 3 years ago
parent
commit
d5fceb1e8b
  1. 5
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerInterceptor.java
  2. 3
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/DefaultAsyncLoadBalancerRequest.java
  3. 3
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/DefaultLoadBalancerRequest.java
  4. 3
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/HttpRequestLoadBalancerRequest.java
  5. 3
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactory.java

5
spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerInterceptor.java

@ -1,5 +1,5 @@ @@ -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; @@ -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 @@ -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)));
}

3
spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/DefaultAsyncLoadBalancerRequest.java

@ -23,7 +23,10 @@ import org.springframework.http.client.ClientHttpResponse; @@ -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>> {

3
spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/DefaultLoadBalancerRequest.java

@ -24,7 +24,10 @@ import org.springframework.http.client.ClientHttpRequestExecution; @@ -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> {

3
spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/HttpRequestLoadBalancerRequest.java

@ -19,7 +19,10 @@ package org.springframework.cloud.client.loadbalancer; @@ -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> {

3
spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactory.java

@ -1,5 +1,5 @@ @@ -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; @@ -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 {

Loading…
Cancel
Save