Fix javadoc checkstyle issues

Fix checkstyle violations for javadoc.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-20 18:45:54 -07:00
committed by Juergen Hoeller
parent 032096d699
commit e0480f75ac
928 changed files with 3729 additions and 2686 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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.
@@ -22,6 +22,7 @@ package org.springframework.messaging;
* @author Mark Fisher
* @author Arjen Poutsma
* @since 4.0
* @param <T> the payload type
* @see org.springframework.messaging.support.MessageBuilder
*/
public interface Message<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -71,6 +71,9 @@ import org.springframework.util.IdGenerator;
*/
public class MessageHeaders implements Map<String, Object>, Serializable {
/**
* UUID for none.
*/
public static final UUID ID_VALUE_NONE = new UUID(0,0);
/**
@@ -81,12 +84,24 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
*/
public static final String ID = "id";
/**
* The key for the message timestamp.
*/
public static final String TIMESTAMP = "timestamp";
/**
* The key for the message content type.
*/
public static final String CONTENT_TYPE = "contentType";
/**
* The key for the message reply channel.
*/
public static final String REPLY_CHANNEL = "replyChannel";
/**
* The key for the message error channel.
*/
public static final String ERROR_CHANNEL = "errorChannel";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -24,7 +24,8 @@ import org.springframework.util.Assert;
/**
* An extension of {@link AbstractMessagingTemplate} that adds operations for sending
* messages to a resolvable destination name as defined by the following interfaces:
* messages to a resolvable destination name. Supports destination resolving as defined by
* the following interfaces:
* <ul>
* <li>{@link DestinationResolvingMessageSendingOperations}</li>
* <li>{@link DestinationResolvingMessageReceivingOperations}</li>
@@ -34,6 +35,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the destination type
*/
public abstract class AbstractDestinationResolvingMessagingTemplate<D> extends AbstractMessagingTemplate<D>
implements DestinationResolvingMessageSendingOperations<D>,

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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.messaging.converter.MessageConverter;
* @author Rossen Stoyanchev
* @author Stephane Nicoll
* @since 4.1
* @param <D> the destination type
*/
public abstract class AbstractMessageReceivingTemplate<D> extends AbstractMessageSendingTemplate<D>
implements MessageReceivingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
* @author Rossen Stoyanchev
* @author Stephane Nicoll
* @since 4.0
* @param <D> the destination type
*/
public abstract class AbstractMessageSendingTemplate<D> implements MessageSendingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.messaging.Message;
* @author Rossen Stoyanchev
* @author Stephane Nicoll
* @since 4.0
* @param <D> the destination type
*/
public abstract class AbstractMessagingTemplate<D> extends AbstractMessageReceivingTemplate<D>
implements MessageRequestReplyOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -32,6 +32,7 @@ import org.springframework.util.Assert;
* @author Agim Emruli
* @author Juergen Hoeller
* @since 4.1
* @param <D> the destination type
* @see DestinationResolver#resolveDestination
*/
public class CachingDestinationResolverProxy<D> implements DestinationResolver<D>, InitializingBean {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -22,6 +22,7 @@ package org.springframework.messaging.core;
*
* @author Mark Fisher
* @since 4.0
* @param <D> the destination type
*/
@FunctionalInterface
public interface DestinationResolver<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the type of destination to receive messages from
* @see DestinationResolver
*/
public interface DestinationResolvingMessageReceivingOperations<D> extends MessageReceivingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the destination type
* @see DestinationResolver
*/
public interface DestinationResolvingMessageRequestReplyOperations<D> extends MessageRequestReplyOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the destination type
* @see DestinationResolver
*/
public interface DestinationResolvingMessageSendingOperations<D> extends MessageSendingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -47,8 +47,14 @@ import org.springframework.util.Assert;
public class GenericMessagingTemplate extends AbstractDestinationResolvingMessagingTemplate<MessageChannel>
implements BeanFactoryAware {
/**
* The default header key used for a send timeout.
*/
public static final String DEFAULT_SEND_TIMEOUT_HEADER = "sendTimeout";
/**
* The default header key used for a receive timeout.
*/
public static final String DEFAULT_RECEIVE_TIMEOUT_HEADER = "receiveTimeout";
private volatile long sendTimeout = -1;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 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.
@@ -26,8 +26,8 @@ import org.springframework.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the type of destination
* @see GenericMessagingTemplate
* @param <D> the type of destination to receive messages from
*/
public interface MessageReceivingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,8 +28,8 @@ import org.springframework.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @see GenericMessagingTemplate
* @param <D> the type of destination
* @see GenericMessagingTemplate
*/
public interface MessageRequestReplyOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.messaging.MessagingException;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <D> the type of destination to send messages to
* @param <D> the destination type
*/
public interface MessageSendingOperations<D> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.lang.Nullable;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the kind of condition that this condition can be combined with or compared to
*/
public abstract class AbstractMessageCondition<T extends AbstractMessageCondition<T>>
implements MessageCondition<T> {

View File

@@ -42,6 +42,9 @@ import org.springframework.util.StringUtils;
public class DestinationPatternsMessageCondition
extends AbstractMessageCondition<DestinationPatternsMessageCondition> {
/**
* The name of the "lookup destination" header.
*/
public static final String LOOKUP_DESTINATION_HEADER = "lookupDestination";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -50,7 +50,7 @@ import org.springframework.util.ClassUtils;
*/
public class HandlerMethod {
/** Logger that is available to subclasses */
/** Logger that is available to subclasses. */
protected final Log logger = LogFactory.getLog(getClass());
private final Object bean;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -92,7 +92,7 @@ public class DefaultMessageHandlerMethodFactory
}
/**
* Set the Validator instance used for validating @Payload arguments
* Set the Validator instance used for validating {@code @Payload} arguments.
* @see org.springframework.validation.annotation.Validated
* @see org.springframework.messaging.handler.annotation.support.PayloadArgumentResolver
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -36,6 +36,9 @@ import org.springframework.util.Assert;
*/
public class DestinationVariableMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver {
/**
* The name of the header used to for template variables.
*/
public static final String DESTINATION_TEMPLATE_VARIABLES_HEADER =
DestinationVariableMethodArgumentResolver.class.getSimpleName() + ".templateVariables";

View File

@@ -29,7 +29,8 @@ import org.springframework.messaging.support.MessageHeaderAccessor;
import org.springframework.util.ReflectionUtils;
/**
* Resolves the following method parameters:
* {@link HandlerMethodArgumentResolver} for header method parameters. Resolves the
* following method parameters:
* <ul>
* <li>Parameters assignable to {@link Map} annotated with {@link Headers @Headers}
* <li>Parameters of type {@link MessageHeaders}

View File

@@ -52,7 +52,7 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu
}
/**
* Add the given {@link HandlerMethodArgumentResolver}s.
* Add the given {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}.
* @since 4.3
*/
public HandlerMethodArgumentResolverComposite addResolvers(@Nullable HandlerMethodArgumentResolver... resolvers) {
@@ -65,7 +65,7 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu
}
/**
* Add the given {@link HandlerMethodArgumentResolver}s.
* Add the given {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}.
*/
public HandlerMethodArgumentResolverComposite addResolvers(
@Nullable List<? extends HandlerMethodArgumentResolver> argumentResolvers) {
@@ -101,7 +101,7 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu
}
/**
* Iterate over registered {@link HandlerMethodArgumentResolver}s and invoke the one that supports it.
* Iterate over registered {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} and invoke the one that supports it.
* @throws IllegalStateException if no suitable {@link HandlerMethodArgumentResolver} is found.
*/
@Override

View File

@@ -66,7 +66,7 @@ public class HandlerMethodReturnValueHandlerComposite implements AsyncHandlerMet
}
/**
* Add the given {@link HandlerMethodReturnValueHandler}s.
* Add the given {@link HandlerMethodReturnValueHandler HandlerMethodReturnValueHandlers}.
*/
public HandlerMethodReturnValueHandlerComposite addHandlers(
@Nullable List<? extends HandlerMethodReturnValueHandler> handlers) {

View File

@@ -33,7 +33,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Provides a method for invoking the handler method for a given message after resolving its
* method argument values through registered {@link HandlerMethodArgumentResolver}s.
* method argument values through registered {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}.
*
* <p>Use {@link #setMessageMethodArgumentResolvers} to customize the list of argument resolvers.
*
@@ -77,7 +77,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
/**
* Set {@link HandlerMethodArgumentResolver}s to use to use for resolving method argument values.
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use to use for resolving method argument values.
*/
public void setMessageMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
this.argumentResolvers = argumentResolvers;
@@ -95,7 +95,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
/**
* Invoke the method after resolving its argument values in the context of the given message.
* <p>Argument values are commonly resolved through {@link HandlerMethodArgumentResolver}s.
* <p>Argument values are commonly resolved through {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}.
* The {@code providedArgs} parameter however may supply argument values to be used directly,
* i.e. without argument resolution.
* @param message the current message being processed

View File

@@ -36,10 +36,10 @@ import org.springframework.util.StringUtils;
*/
public class SimpAttributes {
/** Key for the mutex session attribute */
/** Key for the mutex session attribute. */
public static final String SESSION_MUTEX_NAME = SimpAttributes.class.getName() + ".MUTEX";
/** Key set after the session is completed */
/** Key set after the session is completed. */
public static final String SESSION_COMPLETED_NAME = SimpAttributes.class.getName() + ".COMPLETED";
/** Prefix for the name of session attributes used to store destruction callbacks. */
@@ -89,7 +89,7 @@ public class SimpAttributes {
/**
* Remove the attribute of the given name, if it exists.
* <p>Also removes the registered destruction callback for the specified
* attribute, if any. However it <i>does not</i> execute</i> the callback.
* attribute, if any. However it <i>does not</i> execute the callback.
* It is assumed the removed object will continue to be used and destroyed
* independently at the appropriate time.
* @param name the name of the attribute

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -41,7 +41,7 @@ public abstract class SimpAttributesContextHolder {
}
/**
* Bind the given SimpAttributes to the current thread,
* Bind the given SimpAttributes to the current thread.
* @param attributes the RequestAttributes to expose
*/
public static void setAttributes(@Nullable SimpAttributes attributes) {
@@ -55,7 +55,7 @@ public abstract class SimpAttributesContextHolder {
/**
* Extract the SiMP session attributes from the given message, wrap them in
* a {@link SimpAttributes} instance and bind it to the current thread,
* a {@link SimpAttributes} instance and bind it to the current thread.
* @param message the message to extract session attributes from
*/
public static void setAttributesFromMessage(Message<?> message) {
@@ -73,7 +73,7 @@ public abstract class SimpAttributesContextHolder {
/**
* Return the SimpAttributes currently bound to the thread or raise an
* {@link java.lang.IllegalStateException} if none are bound..
* {@link java.lang.IllegalStateException} if none are bound.
* @return the attributes, never {@code null}
* @throws java.lang.IllegalStateException if attributes are not bound
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -22,7 +22,8 @@ import org.springframework.messaging.handler.DestinationPatternsMessageCondition
import org.springframework.messaging.handler.MessageCondition;
/**
* Encapsulates the following request mapping conditions:
* {@link MessageCondition} for SImple Messaging Protocols. Encapsulates the following
* request mapping conditions:
* <ol>
* <li>{@link SimpMessageTypeMessageCondition}
* <li>{@link DestinationPatternsMessageCondition}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -20,6 +20,8 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
/**
* {@link MessagingException} thrown when a session is missing.
*
* @author Rossen Stoyanchev
* @since 4.0
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -24,6 +24,8 @@ import org.springframework.messaging.handler.invocation.HandlerMethodArgumentRes
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
/**
* {@link HandlerMethodArgumentResolver} to a {@link Principal}.
*
* @author Rossen Stoyanchev
* @since 4.0
*/

View File

@@ -231,7 +231,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
}
/**
* Set the Validator instance used for validating @Payload arguments
* Set the Validator instance used for validating {@code @Payload} arguments.
* @see org.springframework.validation.annotation.Validated
* @see PayloadArgumentResolver
*/
@@ -246,7 +246,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
/**
* Configure a {@link MessageHeaderInitializer} to pass on to
* {@link org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler}s
* {@link org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandlers}
* that send messages from controller return values.
* <p>By default, this property is not set.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -19,7 +19,7 @@ package org.springframework.messaging.simp.broker;
import org.springframework.context.ApplicationEvent;
/**
* Event raised when a broker's availabilty changes
* Event raised when a broker's availability changes.
*
* @author Andy Wilkinson
*/

View File

@@ -62,10 +62,10 @@ import org.springframework.util.StringUtils;
*/
public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
/** Default maximum number of entries for the destination cache: 1024 */
/** Default maximum number of entries for the destination cache: 1024. */
public static final int DEFAULT_CACHE_LIMIT = 1024;
/** Static evaluation context to reuse */
/** Static evaluation context to reuse. */
private static EvaluationContext messageEvalContext =
SimpleEvaluationContext.forPropertyAccessors(new SimpMessageHeaderPropertyAccessor()).build();
@@ -248,15 +248,15 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
/**
* A cache for destinations previously resolved via
* {@link DefaultSubscriptionRegistry#findSubscriptionsInternal(String, Message)}
* {@link DefaultSubscriptionRegistry#findSubscriptionsInternal(String, Message)}.
*/
private class DestinationCache {
/** Map from destination -> <sessionId, subscriptionId> for fast look-ups */
/** Map from destination to {@code <sessionId, subscriptionId>} for fast look-ups. */
private final Map<String, LinkedMultiValueMap<String, String>> accessCache =
new ConcurrentHashMap<>(DEFAULT_CACHE_LIMIT);
/** Map from destination -> <sessionId, subscriptionId> with locking */
/** Map from destination to {@code <sessionId, subscriptionId>} with locking. */
@SuppressWarnings("serial")
private final Map<String, LinkedMultiValueMap<String, String>> updateCache =
new LinkedHashMap<String, LinkedMultiValueMap<String, String>>(DEFAULT_CACHE_LIMIT, 0.75f, true) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -424,7 +424,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
protected abstract SimpUserRegistry createLocalUserRegistry();
/**
* Return a {@link org.springframework.validation.Validator}s instance for validating
* Return a {@link org.springframework.validation.Validator org.springframework.validation.Validators} instance for validating
* {@code @Payload} method arguments.
* <p>In order, this method tries to get a Validator instance:
* <ul>

View File

@@ -88,7 +88,7 @@ public class BufferingStompDecoder {
/**
* Decodes one or more STOMP frames from the given {@code ByteBuffer} into a
* list of {@link Message}s.
* list of {@link Message Messages}.
* <p>If there was enough data to parse a "content-length" header, then the
* value is used to determine how much more data is needed before a new
* attempt to decode is made.

View File

@@ -62,6 +62,9 @@ public class DefaultStompSession implements ConnectionHandlingStompSession {
private static final IdGenerator idGenerator = new AlternativeJdkIdGenerator();
/**
* An empty payload.
*/
public static final byte[] EMPTY_PAYLOAD = new byte[0];
/* STOMP spec: receiver SHOULD take into account an error margin */

View File

@@ -62,7 +62,7 @@ public class ReactorNettyTcpStompClient extends StompClientSupport {
* Connect and notify the given {@link StompSessionHandler} when connected
* on the STOMP level.
* @param handler the handler for the STOMP session
* @return ListenableFuture for access to the session when ready for use
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(StompSessionHandler handler) {
return connect(null, handler);
@@ -74,7 +74,7 @@ public class ReactorNettyTcpStompClient extends StompClientSupport {
* accepts headers to use for the STOMP CONNECT frame.
* @param connectHeaders headers to add to the CONNECT frame
* @param handler the handler for the STOMP session
* @return ListenableFuture for access to the session when ready for use
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(@Nullable StompHeaders connectHeaders, StompSessionHandler handler) {
ConnectionHandlingStompSession session = createSession(connectHeaders, handler);

View File

@@ -80,9 +80,12 @@ import org.springframework.util.concurrent.ListenableFutureTask;
*/
public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler {
/**
* The system session ID.
*/
public static final String SYSTEM_SESSION_ID = "_system_";
/** STOMP recommended error of margin for receiving heartbeats */
/** STOMP recommended error of margin for receiving heartbeats. */
private static final long HEARTBEAT_MULTIPLIER = 3;
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -59,7 +59,7 @@ public class StompDecoder {
/**
* Configure a {@link MessageHeaderInitializer} to apply to the headers of
* {@link Message}s from decoded STOMP frames.
* {@link Message Messages} from decoded STOMP frames.
*/
public void setHeaderInitializer(@Nullable MessageHeaderInitializer headerInitializer) {
this.headerInitializer = headerInitializer;
@@ -76,7 +76,7 @@ public class StompDecoder {
/**
* Decodes one or more STOMP frames from the given {@code ByteBuffer} into a
* list of {@link Message}s. If the input buffer contains partial STOMP frame
* list of {@link Message Messages}. If the input buffer contains partial STOMP frame
* content, or additional content with a partial STOMP frame, the buffer is
* reset and {@code null} is returned.
* @param byteBuffer the buffer to decode the STOMP frame from
@@ -89,7 +89,7 @@ public class StompDecoder {
/**
* Decodes one or more STOMP frames from the given {@code buffer} and returns
* a list of {@link Message}s.
* a list of {@link Message Messages}.
* <p>If the given ByteBuffer contains only partial STOMP frame content and no
* complete STOMP frames, an empty list is returned, and the buffer is reset to
* to where it was.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -75,7 +75,7 @@ public class StompEncoder {
/**
* Encodes the given STOMP {@code message} into a {@code byte[]}
* Encodes the given STOMP {@code message} into a {@code byte[]}.
* @param message the message to encode
* @return the encoded message
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -26,10 +26,11 @@ import org.springframework.messaging.MessageHeaders;
import org.springframework.util.StringUtils;
/**
* A base {@link HeaderMapper} implementation
* A base {@link HeaderMapper} implementation.
*
* @author Stephane Nicoll
* @since 4.1
* @param <T> type of the instance to and from which headers will be mapped
*/
public abstract class AbstractHeaderMapper<T> implements HeaderMapper<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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.
@@ -30,6 +30,7 @@ import org.springframework.util.ObjectUtils;
*
* @author Mark Fisher
* @since 4.0
* @param <T> the payload type
* @see MessageBuilder
*/
public class GenericMessage<T> implements Message<T>, Serializable {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -32,6 +32,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the message payload type
* @see GenericMessage
* @see ErrorMessage
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -114,6 +114,9 @@ import org.springframework.util.StringUtils;
*/
public class MessageHeaderAccessor {
/**
* The default charset used for headers.
*/
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
private static final MimeType[] READABLE_MIME_TYPES = new MimeType[] {

View File

@@ -49,6 +49,9 @@ import org.springframework.util.ObjectUtils;
*/
public class NativeMessageHeaderAccessor extends MessageHeaderAccessor {
/**
* The header name used to store native headers.
*/
public static final String NATIVE_HEADERS = "nativeHeaders";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,6 +28,7 @@ public class FixedIntervalReconnectStrategy implements ReconnectStrategy {
/**
* Create a new {@link FixedIntervalReconnectStrategy} instance.
* @param interval the frequency, in millisecond, at which to try to reconnect
*/
public FixedIntervalReconnectStrategy(long interval) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 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.
@@ -26,7 +26,7 @@ import org.springframework.util.concurrent.ListenableFuture;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <P> the type of payload for outbound {@link Message}s
* @param <P> the type of payload for outbound {@link Message Messages}
*/
public interface TcpConnection<P> extends Closeable {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -26,10 +26,11 @@ import org.springframework.messaging.Message;
/**
* Convenient base class for {@link ReactorNettyCodec} implementations that need
* to work with NIO {@link ByteBuffer}s.
* to work with NIO {@link ByteBuffer ByteBuffers}.
*
* @author Rossen Stoyanchev
* @since 5.0
* @param <P> the message payload type
*/
public abstract class AbstractNioBufferReactorNettyCodec<P> implements ReactorNettyCodec<P> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.lang.Nullable;
* @author Rossen Stoyanchev
* @author Stephane Maldini
* @since 5.0
* @param <T> the object type
*/
class MonoToListenableFutureAdapter<T> extends AbstractMonoToListenableFutureAdapter<T, T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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,11 +29,12 @@ import org.springframework.messaging.Message;
*
* @author Rossen Stoyanchev
* @since 5.0
* @param <P> the message payload type
*/
public interface ReactorNettyCodec<P> {
/**
* Decode the input {@link ByteBuf} into one or more {@link Message}s.
* Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf} into one or more {@link Messages}.
* @param inputBuffer the input buffer to decode from
* @return 0 or more decoded messages
*/

View File

@@ -63,6 +63,7 @@ import org.springframework.util.concurrent.SettableListenableFuture;
* @author Rossen Stoyanchev
* @author Stephane Maldini
* @since 5.0
* @param <P> the type of payload for in and outbound messages
*/
public class ReactorNettyTcpClient<P> implements TcpOperations<P> {

View File

@@ -31,6 +31,7 @@ import org.springframework.util.concurrent.ListenableFuture;
*
* @author Rossen Stoyanchev
* @since 5.0
* @param <P> the type of payload for outbound messages
*/
public class ReactorNettyTcpConnection<P> implements TcpConnection<P> {