Skip to content

Commit 55c7833

Browse files
fifthpositionspencergibb
authored andcommitted
Minor Javadoc cleanup (spring-projects#401)
Nothing major found--mostly just polish.
1 parent 87bb8f1 commit 55c7833

File tree

69 files changed

+267
-266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+267
-266
lines changed

spring-cloud-commons/src/main/java/org/springframework/cloud/client/DefaultServiceInstance.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public Map<String, String> getMetadata() {
6464
}
6565

6666
/**
67-
* Create a uri from the given ServiceInstance's host:port
67+
* Creates a URI from the given ServiceInstance's host:port.
6868
* @param instance
69-
* @return URI of the form (secure)?https:http + "host:port"
69+
* @return URI of the form (secure)?https:http + "host:port".
7070
*/
7171
public static URI getUri(ServiceInstance instance) {
7272
String scheme = (instance.isSecure()) ? "https" : "http";

spring-cloud-commons/src/main/java/org/springframework/cloud/client/ServiceInstance.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,43 @@
2020
import java.util.Map;
2121

2222
/**
23-
* Represents an instance of a Service in a Discovery System
23+
* Represents an instance of a service in a discovery system.
2424
* @author Spencer Gibb
2525
*/
2626
public interface ServiceInstance {
2727

2828
/**
29-
* @return the service id as registered.
29+
* @return The service ID as registered.
3030
*/
3131
String getServiceId();
3232

3333
/**
34-
* @return the hostname of the registered ServiceInstance
34+
* @return The hostname of the registered service instance.
3535
*/
3636
String getHost();
3737

3838
/**
39-
* @return the port of the registered ServiceInstance
39+
* @return The port of the registered service instance.
4040
*/
4141
int getPort();
4242

4343
/**
44-
* @return if the port of the registered ServiceInstance is https or not
44+
* @return Whether the port of the registered service instance uses HTTPS.
4545
*/
4646
boolean isSecure();
4747

4848
/**
49-
* @return the service uri address
49+
* @return The service URI address.
5050
*/
5151
URI getUri();
5252

5353
/**
54-
* @return the key value pair metadata associated with the service instance
54+
* @return The key / value pair metadata associated with the service instance.
5555
*/
5656
Map<String, String> getMetadata();
5757

5858
/**
59-
* @return the scheme of the instance
59+
* @return The scheme of the service instance.
6060
*/
6161
default String getScheme() {
6262
return null;

spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/EnableCircuitBreakerImportSelector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.springframework.core.annotation.Order;
2222

2323
/**
24-
* Import a single circuit breaker implementation Configuration
24+
* Imports a single circuit breaker implementation configuration.
2525
* @author Spencer Gibb
2626
*/
2727
@Order(Ordered.LOWEST_PRECEDENCE - 100)

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@
2121
import org.springframework.cloud.client.ServiceInstance;
2222

2323
/**
24-
* DiscoveryClient represents read operations commonly available to Discovery service such as
25-
* Netflix Eureka or consul.io
24+
* Represents read operations commonly available to discovery services such as Netflix
25+
* Eureka or consul.io.
2626
* @author Spencer Gibb
2727
*/
2828
public interface DiscoveryClient {
2929

3030
/**
31-
* A human readable description of the implementation, used in HealthIndicator
32-
* @return the description
31+
* A human-readable description of the implementation, used in HealthIndicator.
32+
* @return The description.
3333
*/
3434
String description();
3535

3636
/**
37-
* Get all ServiceInstances associated with a particular serviceId
38-
* @param serviceId the serviceId to query
39-
* @return a List of ServiceInstance
37+
* Gets all ServiceInstances associated with a particular serviceId.
38+
* @param serviceId The serviceId to query.
39+
* @return A List of ServiceInstance.
4040
*/
4141
List<ServiceInstance> getInstances(String serviceId);
4242

4343
/**
44-
* @return all known service ids
44+
* @return All known service IDs.
4545
*/
4646
List<String> getServices();
4747

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import org.springframework.cloud.client.discovery.DiscoveryClient;
1010

1111
/**
12-
* A {@link DiscoveryClient} composed of other Discovery Client's and will delegate the
13-
* calls to each of them in order
12+
* A {@link DiscoveryClient} that is composed of other discovery clients and delegates
13+
* calls to each of them in order.
1414
*
1515
* @author Biju Kunjummen
1616
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.List;
1111

1212
/**
13-
* Auto-configuration for Composite Discovery Client.
13+
* Auto-configuration for composite discovery client.
1414
*
1515
* @author Biju Kunjummen
1616
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatEvent.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import org.springframework.context.ApplicationEvent;
2020

2121
/**
22-
* Event DiscoveryClient implementation can broadcast if they support heartbeat's from the
23-
* discovery server. Provides listeners with a basic indication of a state change in the
24-
* service catalog.
22+
* An event that a DiscoveryClient implementation can broadcast if it supports
23+
* heartbeats from the discovery server. Provides listeners with a basic indication
24+
* of a state change in the service catalog.
2525
*
2626
* @author Spencer Gibb
2727
* @author Dave Syer
@@ -32,11 +32,11 @@ public class HeartbeatEvent extends ApplicationEvent {
3232
private final Object state;
3333

3434
/**
35-
* Create a new event with a source (for example a discovery client) and a value.
35+
* Creates a new event with a source (for example, a discovery client) and a value.
3636
* Neither parameter should be relied on to have specific content or format.
3737
*
38-
* @param source the source of the event
39-
* @param state the value indicating state of the catalog
38+
* @param source The source of the event.
39+
* @param state The value indicating state of the catalog.
4040
*/
4141
public HeartbeatEvent(Object source, Object state) {
4242
super(source);
@@ -45,12 +45,12 @@ public HeartbeatEvent(Object source, Object state) {
4545

4646
/**
4747
* A value representing the state of the service catalog. The only requirement is that
48-
* it changes when the catalog is updated, so it can be as simple as a version
49-
* conuter, or a hash. Implementations can provide information to help users visualize
48+
* it changes when the catalog is updated; it can be as simple as a version counter or
49+
* a hash. Implementations can provide information to help users visualize
5050
* what is going on in the catalog, but users should not rely on the content (since
5151
* the implementation of the underlying discovery might change).
5252
*
53-
* @return A value representing state of the service catalog
53+
* @return A value representing state of the service catalog.
5454
*/
5555
public Object getValue() {
5656
return this.state;

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatMonitor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import java.util.concurrent.atomic.AtomicReference;
2020

2121
/**
22-
* Helper class for listeners to the {@link HeartbeatEvent} providing a convenient way to
23-
* determine if there has been a change in state.
22+
* Helper class for listeners to the {@link HeartbeatEvent}, providing a convenient way
23+
* to determine if there has been a change in state.
2424
*
2525
* @author Dave Syer
2626
*/
@@ -29,8 +29,8 @@ public class HeartbeatMonitor {
2929
private AtomicReference<Object> latestHeartbeat = new AtomicReference<>();
3030

3131
/**
32-
* @param value the latest heartbeat
33-
* @return true if the state changed
32+
* @param value The latest heartbeat.
33+
* @return True if the state changed.
3434
*/
3535
public boolean update(Object value) {
3636
Object last = this.latestHeartbeat.get();

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/InstanceRegisteredEvent.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public class InstanceRegisteredEvent<T> extends ApplicationEvent {
3030
private T config;
3131

3232
/**
33-
* Create a new {@link InstanceRegisteredEvent} instance.
34-
* @param source the component that published the event (never {@code null})
35-
* @param config the configuration of the instance
33+
* Creates a new {@link InstanceRegisteredEvent} instance.
34+
* @param source The component that published the event (never {@code null}).
35+
* @param config The configuration of the instance.
3636
*/
3737
public InstanceRegisteredEvent(Object source, T config) {
3838
super(source);

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/ParentHeartbeatEvent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import org.springframework.context.ApplicationEvent;
2020

2121
/**
22-
* Heartbeat Event that a Parent ApplicationContext can send to a child Context. Useful,
23-
* for example, when config server is located via DiscoveryClient, in which case the
22+
* Heartbeat event that a parent ApplicationContext can send to a child context. Useful,
23+
* for example, when a config server is located via a DiscoveryClient, in which case the
2424
* {@link HeartbeatEvent} that triggers this event is fired in the parent (bootstrap)
2525
* context.
2626
*

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/health/DiscoveryCompositeHealthIndicator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import org.springframework.boot.actuate.health.HealthIndicator;
2727

2828
/**
29-
* Gathers all DiscoveryHealthIndicator's from a DiscoveryClient implementation
30-
* and aggregates the statuses.
29+
* Gathers all instances of DiscoveryHealthIndicator from a DiscoveryClient
30+
* implementation and aggregates the statuses.
3131
* @author Spencer Gibb
3232
*/
3333
//TODO: do we need this? Can they just be independent HealthIndicators?

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/health/DiscoveryHealthIndicator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
import org.springframework.boot.actuate.health.Health;
2020

2121
/**
22-
* A health indicator interface specific for a DiscoveryClient implementation
22+
* A health indicator interface specific to a DiscoveryClient implementation.
2323
* @author Spencer Gibb
2424
*/
2525
public interface DiscoveryHealthIndicator {
2626

2727
String getName();
2828

2929
/**
30-
* @return an indication of health
30+
* @return An indication of health.
3131
*/
3232
Health health();
3333

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/noop/NoopDiscoveryClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import org.springframework.cloud.client.discovery.DiscoveryClient;
2424

2525
/**
26-
* DiscoveryClient used when no implementations are found on the classpath
26+
* DiscoveryClient used when no implementations are found on the classpath.
2727
*
28-
* @deprecated Use {@link org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClient instead}
28+
* @deprecated Use {@link org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClient instead}.
2929
*
3030
* @author Dave Syer
3131
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/noop/NoopDiscoveryClientAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/**
4242
*
4343
* @deprecated Use
44-
* {@link org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration instead}
44+
* {@link org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration instead}.
4545
*
4646
* @author Dave Syer
4747
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* A {@link org.springframework.cloud.client.discovery.DiscoveryClient} that will use the
12-
* properties file as a source of service instances
12+
* properties file as a source of service instances.
1313
*
1414
* @author Biju Kunjummen
1515
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.net.URI;
2020

2121
/**
22-
* Spring Boot Auto-Configuration for Simple Properties based Discovery Client
22+
* Spring Boot auto-configuration for simple properties-based discovery client.
2323
*
2424
* @author Biju Kunjummen
2525
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryProperties.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* Properties to hold the details of a
1616
* {@link org.springframework.cloud.client.discovery.DiscoveryClient} service instances
17-
* for a given service
17+
* for a given service.
1818
*
1919
* @author Biju Kunjummen
2020
*/
@@ -54,8 +54,8 @@ public void init() {
5454
public static class SimpleServiceInstance implements ServiceInstance {
5555

5656
/**
57-
* The URI of the service instance. Will be parsed to extract the scheme, hos and
58-
* port.
57+
* The URI of the service instance. Will be parsed to extract the scheme, host,
58+
* and port.
5959
*/
6060
private URI uri;
6161
private String host;
@@ -68,7 +68,7 @@ public static class SimpleServiceInstance implements ServiceInstance {
6868
private Map<String, String> metadata = new LinkedHashMap<>();
6969
/**
7070
* The identifier or name for the service. Multiple instances might share the same
71-
* service id.
71+
* service ID.
7272
*/
7373
private String serviceId;
7474

spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/CloudHypermediaAutoConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
import org.springframework.context.annotation.Configuration;
3030

3131
/**
32-
* Registers a default {@link RemoteResourceRefresher} if at least one {@link RemoteResource} is declared in the system
33-
* and applies verification timings defined in the application properties.
32+
* Registers a default {@link RemoteResourceRefresher} if at least one {@link RemoteResource} is declared in the system.
33+
* Applies verification timings defined in the application properties.
3434
*
3535
* @author Oliver Gierke
3636
*/

spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/DiscoveredResource.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public DiscoveredResource(ServiceInstanceProvider provider, TraversalDefinition
5353
/**
5454
* Configures the {@link RestOperations} to use to execute the traversal and verifying HEAD calls.
5555
*
56-
* @param restOperations can be {@literal null}, resorting to a default {@link RestTemplate} in that case.
56+
* @param restOperations Can be {@literal null}; resorts to a default {@link RestTemplate} in that case.
5757
*/
5858
public void setRestOperations(RestOperations restOperations) {
5959
this.restOperations = restOperations == null ? new RestTemplate() : restOperations;
@@ -81,7 +81,7 @@ public void setLink(Link link) {
8181
}
8282

8383
/**
84-
* Verifies the link to the current
84+
* Verifies the link to the current.
8585
*/
8686
public void verifyOrDiscover() {
8787
this.link = link == null ? discoverLink() : verify(link);
@@ -90,7 +90,7 @@ public void verifyOrDiscover() {
9090
/**
9191
* Verifies the given {@link Link} by issuing an HTTP HEAD request to the resource.
9292
*
93-
* @param link must not be {@literal null}.
93+
* @param link Must not be {@literal null}.
9494
* @return
9595
*/
9696
private Link verify(Link link) {

spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/DynamicServiceInstanceProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.springframework.cloud.client.discovery.DiscoveryClient;
2222

2323
/**
24-
* {@link ServiceInstanceProvider} to work with a {@link DiscoveryClient} to lookup a service by name. Will pick the
24+
* {@link ServiceInstanceProvider} to work with a {@link DiscoveryClient} to look up a service by name. Picks the
2525
* first one returned by the configured {@link DiscoveryClient}.
2626
*
2727
* @author Oliver Gierke

spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/RemoteResource.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
public interface RemoteResource {
2626

2727
/**
28-
* Returns the {@link Link} to the resource in case it is available or {@literal null}
29-
* in case it's gone, i.e. either generally unavailable or can't be discovered.
28+
* Returns the {@link Link} to the resource if it is available, or {@literal null}
29+
* if it is gone (i.e. it either is generally unavailable or can't be discovered).
3030
*/
3131
Link getLink();
3232

3333
/**
34-
* Discovers the the resource in case it hasn't been yet or became unavailable. In
35-
* case a link has been discovered previously, it is verified and either confirmed or
36-
* the link is removed to indicate it's not available anymore.
34+
* Discovers the resource if it hasn't been discovered yet or has become
35+
* unavailable. If a link has been discovered previously, it is verified and either
36+
* confirmed or removed to indicate that it's not available anymore.
3737
*/
3838
void verifyOrDiscover();
3939
}

spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/RemoteResourceRefresher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
2323

2424
/**
25-
* A {@link ScheduledTaskRegistrar} that verifies all {@link DiscoveredResource} instances in the system based
25+
* A {@link ScheduledTaskRegistrar} that verifies all {@link DiscoveredResource} instances in the system, based
2626
* on the given timing configuration.
2727
*
2828
* @author Oliver Gierke

0 commit comments

Comments
 (0)