[#69] Added javadocs

fixes #69
This commit is contained in:
Marcin Grzejszczak
2016-02-23 21:16:02 +01:00
committed by Marcin Grzejszczak
parent be1b986bec
commit 3000a4f37d
98 changed files with 539 additions and 221 deletions

View File

@@ -29,6 +29,7 @@ import org.springframework.util.Assert;
*
* @author Dave Syer
*
* @since 1.0.0
*/
public class DiscoveryClientHostLocator implements HostLocator {

View File

@@ -23,8 +23,11 @@ import java.nio.ByteBuffer;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* Represents the host from which the span was sent
*
* @author Dave Syer
*
* @since 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Host {

View File

@@ -19,11 +19,12 @@ package org.springframework.cloud.sleuth.stream;
import org.springframework.cloud.sleuth.Span;
/**
* Strategy for locating a "host" from a Spring Cloud Span (and whatever other
* Strategy for locating a {@link Host "host"} from a Spring Cloud Span (and whatever other
* environment properties might be available).
*
* @author Dave Syer
*
* @since 1.0.0
*/
public interface HostLocator {

View File

@@ -23,8 +23,17 @@ import org.springframework.context.event.EventListener;
import org.springframework.util.Assert;
/**
* A {@link HostLocator} that retrieves:
*
* <ul>
* <li><b>service name</b> - either from {@link span#getProcessId()} or current application name</li>
* <li><b>address</b> - from {@link ServerProperties}</li>
* <li><b>port</b> - from lazily assigned port or {@link ServerProperties}</li>
* </ul>
*
* @author Dave Syer
*
* @since 1.0.0
*/
public class ServerPropertiesHostLocator implements HostLocator {

View File

@@ -28,6 +28,7 @@ import org.springframework.messaging.SubscribableChannel;
*
* @author Dave Syer
*
* @since 1.0.0
*/
public interface SleuthSink {

View File

@@ -21,14 +21,15 @@ import org.springframework.messaging.MessageChannel;
/**
* Defines a message channel for instrumented applications to use to send span data to a
* message broker. The channel accepts data in the form of {@link Spans} to buffer
* multiple actual Span instances in a single message. A client app may occasionally drop
* message broker. The channel accepts data in the form of {@link spans} to buffer
* multiple actual span instances in a single message. A client app may occasionally drop
* spans, and if it does it should attempt to account for and report the number dropped.
*
* @see SleuthSink
*
* @author Dave Syer
*
* @since 1.0.0
*
* @see SleuthSink
*/
public interface SleuthSource {

View File

@@ -44,12 +44,15 @@ import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
/**
* Autoconfiguration for sending Spans over Spring Cloud Stream. This is for the producer
* {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration Auto-configuration}
* for sending spans over Spring Cloud Stream. This is for the producer
* (via {@link SleuthSource}). A consumer can enable binding to {@link SleuthSink} and
* receive the messages coming from the source (they have the same channel name so there
* is no additional configuration to do by default).
*
* @author Dave Syer
*
* @since 1.0.0
*/
@Configuration
@EnableConfigurationProperties({SleuthStreamProperties.class, SamplerProperties.class})

View File

@@ -19,7 +19,11 @@ package org.springframework.cloud.sleuth.stream;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Properties related to Sleuth Stream
*
* @author Dave Syer
*
* @since 1.0.0
*/
@ConfigurationProperties("spring.sleuth.stream")
public class SleuthStreamProperties {

View File

@@ -28,6 +28,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
*
* @author Dave Syer
*
* @since 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class Spans {

View File

@@ -37,8 +37,12 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.PropertiesLoaderUtils;
/**
* {@link EnvironmentPostProcessor} that sets the default properties for
* Sleuth Stream.
*
* @author Dave Syer
*
* @since 1.0.0
*/
public class StreamEnvironmentPostProcessor implements EnvironmentPostProcessor {

View File

@@ -40,6 +40,8 @@ import org.springframework.integration.annotation.MessageEndpoint;
* A message source for spans. Also handles RPC flavoured annotations.
*
* @author Dave Syer
*
* @since 1.0.0
*/
@MessageEndpoint
public class StreamSpanListener {