java.time package in JDK 8.
+ * Formats fields annotated with the {@link DateTimeFormat} annotation using the JSR-310
+ * java.time package in JDK 8.
*
* @author Juergen Hoeller
* @since 4.0
diff --git a/spring-context/src/main/java/org/springframework/scripting/support/StandardScriptEvaluator.java b/spring-context/src/main/java/org/springframework/scripting/support/StandardScriptEvaluator.java
index 6fc2a6ad8d..d2fd038b27 100644
--- a/spring-context/src/main/java/org/springframework/scripting/support/StandardScriptEvaluator.java
+++ b/spring-context/src/main/java/org/springframework/scripting/support/StandardScriptEvaluator.java
@@ -33,8 +33,8 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
/**
- * {@code javax.script} (JSR-223) based implementation of
- * Spring's {@link ScriptEvaluator} strategy interface.
+ * {@code javax.script} (JSR-223) based implementation of Spring's {@link ScriptEvaluator}
+ * strategy interface.
*
* @author Juergen Hoeller
* @author Costin Leau
diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java
index f1e5406abd..aa08f0d7ad 100644
--- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java
+++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java
@@ -119,7 +119,7 @@ public class AnnotationProcessorPerformanceTests {
@Test
public void testPrototypeCreationWithOverriddenAutowiredPropertiesIsFastEnough() {
- Assume.group(TestGroup.PERFORMANCE);
+ // Assume.group(TestGroup.PERFORMANCE);
Assume.notLogging(factoryLog);
GenericApplicationContext ctx = new GenericApplicationContext();
AnnotationConfigUtils.registerAnnotationConfigProcessors(ctx);
@@ -138,7 +138,7 @@ public class AnnotationProcessorPerformanceTests {
assertSame(spouse, tb.getSpouse());
}
sw.stop();
- //System.out.println(sw.getTotalTimeMillis());
+ System.out.println(sw.getTotalTimeMillis());
assertTrue("Prototype creation took too long: " + sw.getTotalTimeMillis(), sw.getTotalTimeMillis() < 4500);
}
diff --git a/spring-core/src/main/java/org/springframework/core/StandardReflectionParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/StandardReflectionParameterNameDiscoverer.java
index b77ba06c19..92014fed84 100644
--- a/spring-core/src/main/java/org/springframework/core/StandardReflectionParameterNameDiscoverer.java
+++ b/spring-core/src/main/java/org/springframework/core/StandardReflectionParameterNameDiscoverer.java
@@ -21,8 +21,8 @@ import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
/**
- * {@link ParameterNameDiscoverer} implementation which uses JDK 8's
- * reflection facilities for introspecting parameter names.
+ * {@link ParameterNameDiscoverer} implementation which uses JDK 8's reflection facilities
+ * for introspecting parameter names.
*
* @author Juergen Hoeller
* @since 4.0
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java
index da50710602..d32a2910d3 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java
@@ -27,7 +27,8 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
/**
- * Utility class used to collect all annotation values including those declared on meta-annotations.
+ * Utility class used to collect all annotation values including those declared on
+ * meta-annotations.
*
* @author Phillip Webb
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/util/AlternativeJdkIdGenerator.java b/spring-core/src/main/java/org/springframework/util/AlternativeJdkIdGenerator.java
index 4011e0590c..604b508b7e 100644
--- a/spring-core/src/main/java/org/springframework/util/AlternativeJdkIdGenerator.java
+++ b/spring-core/src/main/java/org/springframework/util/AlternativeJdkIdGenerator.java
@@ -22,9 +22,9 @@ import java.util.Random;
import java.util.UUID;
/**
- * A variation of {@link UUID#randomUUID()} that uses {@link SecureRandom} only for
- * the initial seed and {@link Random} thereafter. This provides better performance
- * in exchange for less securely random id's.
+ * A variation of {@link UUID#randomUUID()} that uses {@link SecureRandom} only for the
+ * initial seed and {@link Random} thereafter. This provides better performance in
+ * exchange for less securely random id's.
*
* @author Rossen Stoyanchev
* @author Rob Winch
diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java
index b8a7f337b0..5ef5a7705d 100644
--- a/spring-core/src/main/java/org/springframework/util/MimeType.java
+++ b/spring-core/src/main/java/org/springframework/util/MimeType.java
@@ -171,7 +171,8 @@ public class MimeType implements ComparableFor instance, {@code text/*} includes {@code text/plain} and {@code text/html}, and {@code application/*+xml} - * includes {@code application/soap+xml}, etc. This method is not symmetric. + *
For instance, {@code text/*} includes {@code text/plain} and {@code text/html}, + * and {@code application/*+xml} includes {@code application/soap+xml}, etc. This + * method is not symmetric. * @param other the reference media type with which to compare - * @return {@code true} if this media type includes the given media type; {@code false} otherwise + * @return {@code true} if this media type includes the given media type; + * {@code false} otherwise */ public boolean includes(MimeType other) { if (other == null) { diff --git a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java index 750e2232c6..2b2cd16fcf 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java +++ b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java @@ -29,6 +29,7 @@ import java.util.Map; import org.springframework.util.MimeType.SpecificityComparator; /** + * Miscellaneous {@link MimeType} utility methods. * * @author Arjen Poutsma * @author Rossen Stoyanchev @@ -289,8 +290,7 @@ public abstract class MimeTypeUtils { /** * Sorts the given list of {@code MimeType} objects by specificity. - *
- * Given two mime types: + *
Given two mime types: *
- * For example:
audio/basic < audio/* < */*+ *
For example:
audio/basic < audio/* < */**
audio/basic;level=1 < audio/basic*
audio/basic == text/html
audio/basic == * audio/wave- * * @param mimeTypes the list of mime types to be sorted * @see HTTP 1.1, section * 14.1 diff --git a/spring-core/src/main/java/org/springframework/util/SocketUtils.java b/spring-core/src/main/java/org/springframework/util/SocketUtils.java index 4f6958ca71..28444526ad 100644 --- a/spring-core/src/main/java/org/springframework/util/SocketUtils.java +++ b/spring-core/src/main/java/org/springframework/util/SocketUtils.java @@ -29,7 +29,7 @@ import javax.net.ServerSocketFactory; * for finding available ports on {@code localhost}. * *
Within this class, a TCP port refers to a port for a {@link ServerSocket}; - * whereas, a UDP port refers to a port for a {@link DatagramSocket}. + * whereas, a UDP port refers to a port for a {@link DatagramSocket}. * * @author Sam Brannen * @author Ben Hale @@ -37,7 +37,7 @@ import javax.net.ServerSocketFactory; * @author Gunnar Hillert * @since 4.0 */ -public final class SocketUtils { +public abstract class SocketUtils { /** * The default minimum value for port ranges used when finding an available @@ -51,13 +51,14 @@ public final class SocketUtils { */ public static final int PORT_RANGE_MAX = 65535; + private static final Random random = new Random(System.currentTimeMillis()); /** * Although {@code SocketUtils} consists solely of static utility methods, * this constructor is intentionally {@code public}. - * + * *
Static methods from this class may be invoked from within XML
@@ -81,10 +82,10 @@ public final class SocketUtils {
/* no-op */
}
+
/**
* Find an available TCP port randomly selected from the range
* [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
- *
* @return an available TCP port number
* @throws IllegalStateException if no available port could be found
*/
@@ -95,7 +96,6 @@ public final class SocketUtils {
/**
* Find an available TCP port randomly selected from the range
* [{@code minPort}, {@value #PORT_RANGE_MAX}].
- *
* @param minPort the minimum port number
* @return an available TCP port number
* @throws IllegalStateException if no available port could be found
@@ -107,7 +107,6 @@ public final class SocketUtils {
/**
* Find an available TCP port randomly selected from the range
* [{@code minPort}, {@code maxPort}].
- *
* @param minPort the minimum port number
* @param maxPort the maximum port number
* @return an available TCP port number
@@ -120,7 +119,6 @@ public final class SocketUtils {
/**
* Find the requested number of available TCP ports, each randomly selected
* from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
- *
* @param numRequested the number of available ports to find
* @return a sorted set of available TCP port numbers
* @throws IllegalStateException if the requested number of available ports could not be found
@@ -132,7 +130,6 @@ public final class SocketUtils {
/**
* Find the requested number of available TCP ports, each randomly selected
* from the range [{@code minPort}, {@code maxPort}].
- *
* @param numRequested the number of available ports to find
* @param minPort the minimum port number
* @param maxPort the maximum port number
@@ -146,7 +143,6 @@ public final class SocketUtils {
/**
* Find an available UDP port randomly selected from the range
* [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
- *
* @return an available UDP port number
* @throws IllegalStateException if no available port could be found
*/
@@ -157,7 +153,6 @@ public final class SocketUtils {
/**
* Find an available UDP port randomly selected from the range
* [{@code minPort}, {@value #PORT_RANGE_MAX}].
- *
* @param minPort the minimum port number
* @return an available UDP port number
* @throws IllegalStateException if no available port could be found
@@ -169,7 +164,6 @@ public final class SocketUtils {
/**
* Find an available UDP port randomly selected from the range
* [{@code minPort}, {@code maxPort}].
- *
* @param minPort the minimum port number
* @param maxPort the maximum port number
* @return an available UDP port number
@@ -182,7 +176,6 @@ public final class SocketUtils {
/**
* Find the requested number of available UDP ports, each randomly selected
* from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
- *
* @param numRequested the number of available ports to find
* @return a sorted set of available UDP port numbers
* @throws IllegalStateException if the requested number of available ports could not be found
@@ -194,7 +187,6 @@ public final class SocketUtils {
/**
* Find the requested number of available UDP ports, each randomly selected
* from the range [{@code minPort}, {@code maxPort}].
- *
* @param numRequested the number of available ports to find
* @param minPort the minimum port number
* @param maxPort the maximum port number
@@ -247,7 +239,6 @@ public final class SocketUtils {
/**
* Find a pseudo-random port number within the range
* [{@code minPort}, {@code maxPort}].
- *
* @param minPort the minimum port number
* @param maxPort the maximum port number
* @return a random port number within the specified range
@@ -260,7 +251,6 @@ public final class SocketUtils {
/**
* Find an available port for this {@code SocketType}, randomly selected
* from the range [{@code minPort}, {@code maxPort}].
- *
* @param minPort the minimum port number
* @param maxPort the maximum port number
* @return an available port number for this socket type
@@ -289,7 +279,6 @@ public final class SocketUtils {
/**
* Find the requested number of available ports for this {@code SocketType},
* each randomly selected from the range [{@code minPort}, {@code maxPort}].
- *
* @param numRequested the number of available ports to find
* @param minPort the minimum port number
* @param maxPort the maximum port number
diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java
index 79b5e334b5..f5f5612cba 100644
--- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java
+++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java
@@ -33,8 +33,8 @@ public class ListenableFutureTask Depending on the implementation, this method may block indefinitely. To provide a
* maximum wait time, use {@link #send(Message, long)}.
* @param message the {@link Message} to send
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java
index 65af926ff3..39b88b860f 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java
@@ -32,11 +32,9 @@ public interface MessageHandler {
* message, but fails to do so, a {@code MessageHandlingException} is
* thrown. In the last case it is recommended to treat the message as tainted
* and go into an error scenario.
- *
- * When the handling results in a failure of another message being sent
+ * When the handling results in a failure of another message being sent
* (e.g. a "reply" message), that failure will trigger a
* {@code MessageDeliveryException}.
- *
* @param message the message to be handled
* reply related to the handling of the message
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/MessageHeaders.java b/spring-messaging/src/main/java/org/springframework/messaging/MessageHeaders.java
index 47f672dcef..c5f3502f68 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/MessageHeaders.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/MessageHeaders.java
@@ -100,6 +100,7 @@ public final class MessageHeaders implements Map The BeanFactory to access must be set via
- * Handler methods which are annotated with this annotation are allowed to have
+ *
+ * Handler methods which are annotated with this annotation are allowed to have
* flexible signatures. They may have arguments of the following types, in arbitrary
* order:
*
- * By default the return value is wrapped as a message and sent to the destination
+ *
+ * By default the return value is wrapped as a message and sent to the destination
* specified with an {@link SendTo} method-level annotation.
- *
- * STOMP over WebSocket: an {@link SendTo} annotation is not strictly required --
+ *
+ * STOMP over WebSocket: an {@link SendTo} annotation is not strictly required --
* by default the message will be sent to the same destination as the incoming
* message but with an additional prefix ("/topic" by default). It is also possible
* to use {@link org.springframework.messaging.simp.annotation.SendToUser} to
@@ -87,8 +86,7 @@ public @interface MessageMapping {
/**
* Destination-based mapping expressed by this annotation.
- *
- * For STOMP over WebSocket messages: this is the destination of the STOMP message
+ * For STOMP over WebSocket messages: this is the destination of the STOMP message
* (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported
* and so are path template variables (e.g. "/price.stock.{ticker}"").
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java
index af40fa889a..c2dfdfbd17 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java
@@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.messaging.support.converter.MessageConverter;
-
/**
* Annotation that binds a method parameter to the payload of a message. The payload may
* be passed through a {@link MessageConverter} to convert it from serialized form with a
@@ -43,16 +42,14 @@ public @interface Payload {
* This attribute may or may not be supported depending on whether the message being
* handled contains a non-primitive Object as its payload or is in serialized form
* and requires message conversion.
- *
- * When processing STOMP over WebSocket messages this attribute is not supported.
+ * When processing STOMP over WebSocket messages this attribute is not supported.
*/
String value() default "";
/**
* Whether payload content is required.
- *
- * Default is {@code true}, leading to an exception if there is no payload. Switch to
- * {@code false} to have {@code null} passed when there is no payload.
+ * Default is {@code true}, leading to an exception if there is no payload. Switch
+ * to {@code false} to have {@code null} passed when there is no payload.
*/
boolean required() default true;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/SendTo.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/SendTo.java
index 9704f8e0a6..8cfc90dcef 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/SendTo.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/SendTo.java
@@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.messaging.Message;
-
/**
* Annotation that indicates a method's return value should be converted to
* a {@link Message} and sent to the specified destination.
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java
index a8341ab7e0..7a1027c638 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java
@@ -33,7 +33,6 @@ import org.springframework.messaging.handler.method.HandlerMethodArgumentResolve
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
-
/**
* Abstract base class for resolving method arguments from a named value. Message headers,
* and path variables are examples of named values. Each may have a name, a required flag,
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolver.java
index 44b13fd6f1..289c573707 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolver.java
@@ -29,7 +29,6 @@ import org.springframework.messaging.handler.method.AbstractExceptionHandlerMeth
import org.springframework.messaging.handler.method.HandlerMethodSelector;
import org.springframework.util.ReflectionUtils.MethodFilter;
-
/**
* A sub-class of {@link AbstractExceptionHandlerMethodResolver} that looks for
* {@link MessageExceptionHandler}-annotated methods in a given class. The actual
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java
index c3b7a7153f..a46013f5e1 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java
@@ -22,7 +22,6 @@ import org.springframework.core.convert.ConversionService;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.Header;
-
/**
* Resolves method parameters annotated with {@link Header @Header}.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolver.java
index 3be9f9a48b..66d6575ebd 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolver.java
@@ -29,7 +29,6 @@ import org.springframework.messaging.support.MessageHeaderAccessor;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
-
/**
* Resolves the following method parameters:
*
- * This {@link HandlerMethodArgumentResolver} should be ordered last as it supports all
+ * This {@link HandlerMethodArgumentResolver} should be ordered last as it supports all
* types and does not require the {@link Payload} annotation.
*
* @author Rossen Stoyanchev
@@ -43,7 +41,7 @@ public class PayloadArgumentResolver implements HandlerMethodArgumentResolver {
public PayloadArgumentResolver(MessageConverter messageConverter) {
- Assert.notNull(messageConverter, "converter is required");
+ Assert.notNull(messageConverter, "converter must not be null");
this.converter = messageConverter;
}
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/AbstractMessageCondition.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/AbstractMessageCondition.java
index fb6098ffae..ad6ea0cb3d 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/AbstractMessageCondition.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/AbstractMessageCondition.java
@@ -28,7 +28,6 @@ import java.util.Iterator;
*/
public abstract class AbstractMessageCondition It is assumed that both instances have been obtained via
* {@link #getMatchingCondition(Message)} to ensure they
* contain only patterns that match the request and are sorted with
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/MessageCondition.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/MessageCondition.java
index a723c308a3..c828827f8f 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/MessageCondition.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/condition/MessageCondition.java
@@ -18,7 +18,6 @@ package org.springframework.messaging.handler.condition;
import org.springframework.messaging.Message;
-
/**
* Contract for mapping conditions to messages.
*
@@ -26,8 +25,7 @@ import org.springframework.messaging.Message;
* matched to a specific Message, as well as compared to each other in the
* context of a Message to determine which one matches a request more closely.
*
- * @param
- * By default the list of prefixes is empty in which case all destinations match.
+ * By default the list of prefixes is empty in which case all destinations match.
*/
public void setDestinationPrefixes(Collection
- * Sub-classes should also take into account custom argument types configured via
+ * Sub-classes should also take into account custom argument types configured via
* {@link #setCustomArgumentResolvers(java.util.List)}.
*/
protected abstract List extends HandlerMethodArgumentResolver> initArgumentResolvers();
@@ -211,9 +207,8 @@ public abstract class AbstractMethodMessageHandler
- * Sub-classes should also take into account custom return value types configured via
- * {@link #setCustomReturnValueHandlers(java.util.List)}.
+ * Sub-classes should also take into account custom return value types configured
+ * via {@link #setCustomReturnValueHandlers(java.util.List)}.
*/
protected abstract List extends HandlerMethodReturnValueHandler> initReturnValueHandlers();
@@ -226,7 +221,6 @@ public abstract class AbstractMethodMessageHandler
- * If no destination prefixes are configured, the destination is returned as is.
- *
+ * If no destination prefixes are configured, the destination is returned as is.
* @return the destination to use to find matching message handling methods
* or {@code null} if the destination does not match
*/
@@ -422,10 +410,8 @@ public abstract class AbstractMethodMessageHandler
- * Use one of the static factory method in this class, then call getters and setters, and
- * at the end if necessary call {@link #toMap()} to obtain the updated headers.
+ *
+ * Use one of the static factory method in this class, then call getters and setters,
+ * and at the end if necessary call {@link #toMap()} to obtain the updated headers.
*
* @author Rossen Stoyanchev
* @since 4.0
@@ -58,7 +57,7 @@ public class SimpMessageHeaderAccessor extends NativeMessageHeaderAccessor {
*/
protected SimpMessageHeaderAccessor(SimpMessageType messageType, Map
- * This is a method-level annotations that can be combined with a type-level
+ *
+ * This is a method-level annotations that can be combined with a type-level
* {@link org.springframework.messaging.handler.annotation.MessageMapping @MessageMapping}
- *
- * Supports the same method arguments as
+ *
+ * Supports the same method arguments as
* {@link org.springframework.messaging.handler.annotation.MessageMapping}, however
* subscription messages typically do not have a body.
- *
- * The return value also follows the same rules as for
+ *
+ * The return value also follows the same rules as for
* {@link org.springframework.messaging.handler.annotation.MessageMapping} except if
* the method is not annotated with
* {@link org.springframework.messaging.handler.annotation.SendTo} or {@link SendToUser},
@@ -52,8 +51,7 @@ public @interface SubscribeMapping {
/**
* Destination-based mapping expressed by this annotation.
- *
- * For STOMP over WebSocket messages: this is the destination of the STOMP message
+ * For STOMP over WebSocket messages: this is the destination of the STOMP message
* (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported
* and so are path template variables (e.g. "/price.stock.{ticker}"").
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/MissingSessionUserException.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/MissingSessionUserException.java
index 80e371f975..aaedbd251b 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/MissingSessionUserException.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/MissingSessionUserException.java
@@ -19,9 +19,7 @@ package org.springframework.messaging.simp.annotation.support;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
- *
* @author Rossen Stoyanchev
* @since 4.0
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/PrincipalMethodArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/PrincipalMethodArgumentResolver.java
index 90dbd6f423..b718a80264 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/PrincipalMethodArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/PrincipalMethodArgumentResolver.java
@@ -23,14 +23,12 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.handler.method.HandlerMethodArgumentResolver;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
-
/**
* @author Rossen Stoyanchev
* @since 4.0
*/
public class PrincipalMethodArgumentResolver implements HandlerMethodArgumentResolver {
-
@Override
public boolean supportsParameter(MethodParameter parameter) {
Class> paramType = parameter.getParameterType();
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java
index fd10a0f78b..898a25e3ce 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java
@@ -32,12 +32,11 @@ import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
-
/**
* A {@link HandlerMethodReturnValueHandler} for sending to destinations specified in a
* {@link SendTo} or {@link SendToUser} method-level annotations.
- *
- * The value returned from the method is converted, and turned to a {@link Message} and
+ *
+ * The value returned from the method is converted, and turned to a {@link Message} and
* sent through the provided {@link MessageChannel}. The
* message is then enriched with the sessionId of the input message as well as the
* destination from the annotation(s). If multiple destinations are specified, a copy of
@@ -58,7 +57,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
public SendToMethodReturnValueHandler(SimpMessageSendingOperations messagingTemplate, boolean annotationRequired) {
- Assert.notNull(messagingTemplate, "messagingTemplate is required");
+ Assert.notNull(messagingTemplate, "messagingTemplate must not be null");
this.messagingTemplate = messagingTemplate;
this.annotationRequired = annotationRequired;
}
@@ -68,8 +67,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
* Configure a default prefix to add to message destinations in cases where a method
* is not annotated with {@link SendTo @SendTo} or does not specify any destinations
* through the annotation's value attribute.
- *
- * By default, the prefix is set to "/topic".
+ * By default, the prefix is set to "/topic".
*/
public void setDefaultDestinationPrefix(String defaultDestinationPrefix) {
this.defaultDestinationPrefix = defaultDestinationPrefix;
@@ -87,8 +85,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
* Configure a default prefix to add to message destinations in cases where a
* method is annotated with {@link SendToUser @SendToUser} but does not specify
* any destinations through the annotation's value attribute.
- *
- * By default, the prefix is set to "/queue".
+ * By default, the prefix is set to "/queue".
*/
public void setDefaultUserDestinationPrefix(String prefix) {
this.defaultUserDestinationPrefix = prefix;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java
index 0d6b358241..e236ea9f2a 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java
@@ -29,7 +29,6 @@ import org.springframework.messaging.simp.annotation.SubscribeMapping;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert;
-
/**
* A {@link HandlerMethodReturnValueHandler} for replying directly to a subscription. It
* supports methods annotated with {@link org.springframework.messaging.simp.annotation.SubscribeMapping} unless they're also annotated
@@ -49,10 +48,10 @@ public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturn
/**
* @param messagingTemplate a messaging template for sending messages directly
- * to clients, e.g. in response to a subscription
+ * to clients, e.g. in response to a subscription
*/
public SubscriptionMethodReturnValueHandler(MessageSendingOperations
- * When messages are processed, the matching prefix is removed from the destination in
- * order to form the lookup path. This means annotations should not contain the
+ * When messages are processed, the matching prefix is removed from the destination
+ * in order to form the lookup path. This means annotations should not contain the
* destination prefix.
- *
- * Prefixes that do not have a trailing slash will have one automatically appended.
+ * Prefixes that do not have a trailing slash will have one automatically appended.
*/
public MessageBrokerRegistry setApplicationDestinationPrefixes(String... prefixes) {
this.applicationDestinationPrefixes = prefixes;
@@ -91,14 +89,12 @@ public class MessageBrokerRegistry {
* provide the ability for a user to subscribe to queue names unique to their
* session as well as for others to send messages to those unique,
* user-specific queues.
- *
- * For example when a user attempts to subscribe to "/user/queue/position-updates",
+ * For example when a user attempts to subscribe to "/user/queue/position-updates",
* the destination may be translated to "/queue/position-updatesi9oqdfzo" yielding a
* unique queue name that does not collide with any other user attempting to do the same.
* Subsequently when messages are sent to "/user/{username}/queue/position-updates",
* the destination is translated to "/queue/position-updatesi9oqdfzo".
- *
- * The default prefix used to identify such destinations is "/user/".
+ * The default prefix used to identify such destinations is "/user/".
*/
public MessageBrokerRegistry setUserDestinationPrefix(String destinationPrefix) {
this.userDestinationPrefix = destinationPrefix;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java
index ac38336b6f..a9db100c91 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java
@@ -19,7 +19,6 @@ package org.springframework.messaging.simp.config;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
-
/**
* Registration class for configuring a {@link SimpleBrokerMessageHandler}.
*
@@ -33,6 +32,7 @@ public class SimpleBrokerRegistration extends AbstractBrokerRegistration {
super(clientOutboundChannel, destinationPrefixes);
}
+
@Override
protected SimpleBrokerMessageHandler getMessageHandler() {
return new SimpleBrokerMessageHandler(getClientOutboundChannel(), getDestinationPrefixes());
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java
index 8b73855a2c..394e3769cb 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java
@@ -90,8 +90,7 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
* Set the interval, in milliseconds, at which the "system" relay session will,
* in the absence of any other data being sent, send a heartbeat to the STOMP broker.
* A value of zero will prevent heartbeats from being sent to the broker.
- *
- * The default value is 10000.
+ * The default value is 10000.
*/
public StompBrokerRelayRegistration setSystemHeartbeatSendInterval(long systemHeartbeatSendInterval) {
this.systemHeartbeatSendInterval = systemHeartbeatSendInterval;
@@ -103,8 +102,7 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
* expects, in the absence of any other data, to receive a heartbeat from the STOMP
* broker. A value of zero will configure the relay session to expect not to receive
* heartbeats from the broker.
- *
- * The default value is 10000.
+ * The default value is 10000.
*/
public StompBrokerRelayRegistration setSystemHeartbeatReceiveInterval(long heartbeatReceiveInterval) {
this.systemHeartbeatReceiveInterval = heartbeatReceiveInterval;
@@ -114,8 +112,7 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
/**
* Configure whether the {@link StompBrokerRelayMessageHandler} should start
* automatically when the Spring ApplicationContext is refreshed.
- *
- * The default setting is {@code true}.
+ * The default setting is {@code true}.
*/
public StompBrokerRelayRegistration setAutoStartup(boolean autoStartup) {
this.autoStartup = autoStartup;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractBrokerMessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractBrokerMessageHandler.java
index 3521b69b16..381f19a510 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractBrokerMessageHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractBrokerMessageHandler.java
@@ -30,9 +30,7 @@ import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.simp.BrokerAvailabilityEvent;
import org.springframework.util.CollectionUtils;
-
/**
- *
* @author Rossen Stoyanchev
* @since 4.0
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractSubscriptionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractSubscriptionRegistry.java
index 0c1d55d6aa..7505b617ce 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractSubscriptionRegistry.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractSubscriptionRegistry.java
@@ -23,7 +23,6 @@ import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.util.MultiValueMap;
-
/**
* @author Rossen Stoyanchev
* @since 4.0
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistry.java
index 70940105ea..d8accd01b3 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistry.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistry.java
@@ -227,7 +227,7 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
public SessionSubscriptionInfo(String sessionId) {
- Assert.notNull(sessionId, "sessionId is required");
+ Assert.notNull(sessionId, "sessionId must not be null");
this.sessionId = sessionId;
}
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java
index 3be5bd5f5e..7205643b22 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java
@@ -30,8 +30,8 @@ import java.util.Set;
/**
* A default implementation of {@link UserDestinationResolver}.
- *
- * Resolves messages sent to destination patterns "/user/{user-name}/**" as well as
+ *
+ * Resolves messages sent to destination patterns "/user/{user-name}/**" as well as
* subscriptions to destinations "/user/queue/**" where the "/user/" prefix used to
* recognize such destinations is customizable via
* {@link #setUserDestinationPrefix(String)}.
@@ -54,24 +54,21 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver {
/**
* Create an instance that will access user session id information through
* the provided registry.
- *
* @param userSessionRegistry the registry, never {@code null}
*/
public DefaultUserDestinationResolver(UserSessionRegistry userSessionRegistry) {
- Assert.notNull(userSessionRegistry, "'userSessionRegistry' is required");
+ Assert.notNull(userSessionRegistry, "'userSessionRegistry' must not be null");
this.userSessionRegistry = userSessionRegistry;
}
/**
* The prefix used to identify user destinations. Any destinations that do not
* start with the given prefix are not be resolved.
- *
- * The default value is "/user/".
- *
+ * The default value is "/user/".
* @param prefix the prefix to use
*/
public void setUserDestinationPrefix(String prefix) {
- Assert.hasText(prefix, "prefix is required");
+ Assert.hasText(prefix, "prefix must not be empty");
this.destinationPrefix = prefix.endsWith("/") ? prefix : prefix + "/";
this.subscriptionDestinationPrefix = this.destinationPrefix + "queue/";
}
@@ -79,8 +76,7 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver {
/**
* Return the prefix used to identify user destinations. Any destinations that do not
* start with the given prefix are not be resolved.
- *
- * By default "/user/queue/".
+ * By default "/user/queue/".
*/
public String getDestinationPrefix() {
return this.destinationPrefix;
@@ -88,8 +84,7 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver {
/**
* Return the prefix used to identify user destinations for (un)subscribe messages.
- *
- * By default "/user/queue/".
+ * By default "/user/queue/".
*/
public String getSubscriptionDestinationPrefix() {
return this.subscriptionDestinationPrefix;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java
index 91340da743..bd4ef6e62d 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java
@@ -46,10 +46,8 @@ public class DefaultUserSessionRegistry implements UserSessionRegistry {
@Override
public void registerSessionId(String user, String sessionId) {
-
- Assert.notNull(user, "'user' is required");
- Assert.notNull(user, "'sessionId' is required");
-
+ Assert.notNull(user, "User must not be null");
+ Assert.notNull(sessionId, "Session ID must not be null");
synchronized (this.lock) {
Set
- * By default an instance of {@link DefaultFormattingConversionService} is used.
+ * By default an instance of {@link DefaultFormattingConversionService} is used.
*/
public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService;
@@ -148,8 +145,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
/**
* Set the PathMatcher implementation to use for matching destinations
* against configured destination patterns.
- *
- * By default AntPathMatcher is used
+ * By default AntPathMatcher is used
*/
public void setPathMatcher(PathMatcher pathMatcher) {
Assert.notNull(pathMatcher, "PathMatcher must not be null");
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpMessageTypeMessageCondition.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpMessageTypeMessageCondition.java
index 582ed40c5c..30c1845cb2 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpMessageTypeMessageCondition.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpMessageTypeMessageCondition.java
@@ -45,11 +45,10 @@ public class SimpMessageTypeMessageCondition extends AbstractMessageCondition
- * For example when a user attempts to subscribe to "/user/queue/position-updates",
+ *
+ * For example when a user attempts to subscribe to "/user/queue/position-updates",
* the destination may be resolved to "/queue/position-updates-useri9oqdfzo" yielding a
* unique queue name that does not collide with any other user attempting to do the same.
* Subsequently when messages are sent to "/user/{username}/queue/position-updates",
@@ -43,11 +42,9 @@ public interface UserDestinationResolver {
* Resolve the destination of the message to one or more user/session-specific target
* destinations. If the user has multiple sessions, the method may return more than
* one target destinations.
- *
* @param message the message to resolve
- *
* @return the resolved unique user destinations or an empty Set if the message
- * destination is not recognized as a user destination
+ * destination is not recognized as a user destination
*/
Set
- * Used in support of resolving unique session-specific user destinations.
+ *
+ * Used in support of resolving unique session-specific user destinations.
* See {@link DefaultUserDestinationResolver} for more details.
*
* @author Rossen Stoyanchev
* @since 4.0
- *
* @see DefaultUserDestinationResolver
*/
public interface UserSessionRegistry {
-
/**
* Return the active session id's for the given user.
- *
* @param user the user
* @return a set with 0 or more session id's
*/
@@ -26,7 +23,6 @@ public interface UserSessionRegistry {
/**
* Register an active session id for the given user.
- *
* @param user the user
* @param sessionId the session id
*/
@@ -34,11 +30,9 @@ public interface UserSessionRegistry {
/**
* Unregister the session id for a user.
- *
* @param user the user
* @param sessionId the session id
*/
void unregisterSessionId(String user, String sessionId);
-
}
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
index 9c1de3f3c1..9941cff977 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
@@ -39,7 +39,6 @@ import org.springframework.util.concurrent.ListenableFuture;
import org.springframework.util.concurrent.ListenableFutureCallback;
import org.springframework.util.concurrent.ListenableFutureTask;
-
/**
* A {@link MessageHandler} that handles messages by forwarding them to a STOMP broker.
* For each new {@link SimpMessageType#CONNECT CONNECT} message, an independent TCP
@@ -49,8 +48,8 @@ import org.springframework.util.concurrent.ListenableFutureTask;
* sends messages back on the TCP connection, those messages are enriched with the session
* id of the client and sent back downstream through the {@link MessageChannel} provided
* to the constructor.
- *
- * This class also automatically opens a default "system" TCP connection to the message
+ *
+ * This class also automatically opens a default "system" TCP connection to the message
* broker that is used for sending messages that originate from the server application (as
* opposed to from a client). Such messages are recognized because they are not associated
* with any client and therefore do not have a session id header. The "system" connection
@@ -103,11 +102,11 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
/**
* @param messageChannel the channel to send messages from the STOMP broker to
* @param destinationPrefixes the broker supported destination prefixes; destinations
- * that do not match the given prefix are ignored.
+ * that do not match the given prefix are ignored.
*/
public StompBrokerRelayMessageHandler(MessageChannel messageChannel, Collection
- * The default value is 10000.
- *
- * See class-level documentation for more information on the "system" connection.
+ * The default value is 10000.
+ * See class-level documentation for more information on the "system" connection.
*/
public void setSystemHeartbeatSendInterval(long systemHeartbeatSendInterval) {
this.systemHeartbeatSendInterval = systemHeartbeatSendInterval;
@@ -167,10 +164,8 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
* expects, in the absence of any other data, to receive a heartbeat from the STOMP
* broker. A value of zero will configure the connection to expect not to receive
* heartbeats from the broker.
- *
- * The default value is 10000.
- *
- * See class-level documentation for more information on the "system" connection.
+ * The default value is 10000.
+ * See class-level documentation for more information on the "system" connection.
*/
public void setSystemHeartbeatReceiveInterval(long heartbeatReceiveInterval) {
this.systemHeartbeatReceiveInterval = heartbeatReceiveInterval;
@@ -187,8 +182,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
/**
* Set the login for the "system" connection used to send messages to the STOMP
* broker without having a client session (e.g. REST/HTTP request handling method).
- *
- * See class-level documentation for more information on the "system" connection.
+ * See class-level documentation for more information on the "system" connection.
*/
public void setSystemLogin(String systemLogin) {
Assert.hasText(systemLogin, "systemLogin must not be empty");
@@ -205,8 +199,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
/**
* Set the passcode for the "system" connection used to send messages to the STOMP
* broker without having a client session (e.g. REST/HTTP request handling method).
- *
- * See class-level documentation for more information on the "system" connection.
+ * See class-level documentation for more information on the "system" connection.
*/
public void setSystemPasscode(String systemPasscode) {
this.systemPasscode = systemPasscode;
@@ -225,8 +218,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
* the STOMP broker. This may be useful for example in a cloud environment where the
* actual host to which the TCP connection is established is different from the host
* providing the cloud-based STOMP service.
- *
- * By default this property is not set.
+ * By default this property is not set.
*/
public void setVirtualHost(String virtualHost) {
this.virtualHost = virtualHost;
@@ -374,8 +366,8 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
private StompConnectionHandler(String sessionId, StompHeaderAccessor connectHeaders,
boolean isRemoteClientSession) {
- Assert.notNull(sessionId, "sessionId is required");
- Assert.notNull(connectHeaders, "connectHeaders is required");
+ Assert.notNull(sessionId, "SessionId must not be null");
+ Assert.notNull(connectHeaders, "ConnectHeaders must not be null");
this.sessionId = sessionId;
this.connectHeaders = connectHeaders;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompCommand.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompCommand.java
index e7be4e7509..cdd5cc8df3 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompCommand.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompCommand.java
@@ -23,9 +23,7 @@ import java.util.Map;
import org.springframework.messaging.simp.SimpMessageType;
-
/**
- *
* @author Rossen Stoyanchev
* @since 4.0
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
index fa2b4fa214..ea81e06695 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
@@ -32,13 +32,12 @@ import org.springframework.util.MimeType;
import org.springframework.util.MimeTypeUtils;
import org.springframework.util.StringUtils;
-
/**
* Can be used to prepare headers for a new STOMP message, or to access and/or modify
* STOMP-specific headers of an existing message.
- *
- * Use one of the static factory method in this class, then call getters and setters, and
- * at the end if necessary call {@link #toMap()} to obtain the updated headers
+ *
+ * Use one of the static factory method in this class, then call getters and setters,
+ * and at the end if necessary call {@link #toMap()} to obtain the updated headers
* or call {@link #toNativeHeaderMap()} to obtain only the STOMP-specific headers.
*
* @author Rossen Stoyanchev
@@ -101,7 +100,7 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
super(command.getMessageType(), externalSourceHeaders);
- Assert.notNull(command, "command is required");
+ Assert.notNull(command, "Command must not be null");
setHeader(COMMAND_HEADER, command);
if (externalSourceHeaders != null) {
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java b/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java
index c0b9873440..3aac418832 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java
@@ -31,7 +31,6 @@ import org.springframework.util.ObjectUtils;
*
* @author Mark Fisher
* @since 4.0
- *
* @see MessageBuilder
*/
public class GenericMessage
- * The default value is {@code null}. However when {@link CompositeMessageConverter}
+ * The default value is {@code null}. However when {@link CompositeMessageConverter}
* is used it configures all of its delegates with a default resolver.
*/
public void setContentTypeResolver(ContentTypeResolver resolver) {
@@ -95,15 +93,13 @@ public abstract class AbstractMessageConverter implements MessageConverter {
/**
* Configure the preferred serialization class to use (byte[] or String) when
* converting an Object payload to a {@link Message}.
- *
- * The default value is byte[].
- *
- * @param clazz either byte[] or String
+ * The default value is byte[].
+ * @param payloadClass either byte[] or String
*/
- public void setSerializedPayloadClass(Class> clazz) {
- Assert.isTrue(byte[].class.equals(clazz) || String.class.equals(clazz),
- "Payload class must be byte[] or String: " + clazz);
- this.serializedPayloadClass = clazz;
+ public void setSerializedPayloadClass(Class> payloadClass) {
+ Assert.isTrue(byte[].class.equals(payloadClass) || String.class.equals(payloadClass),
+ "Payload class must be byte[] or String: " + payloadClass);
+ this.serializedPayloadClass = payloadClass;
}
/**
@@ -117,10 +113,8 @@ public abstract class AbstractMessageConverter implements MessageConverter {
* Returns the default content type for the payload. Called when
* {@link #toMessage(Object, MessageHeaders)} is invoked without message headers or
* without a content type header.
- *
- * By default, this returns the first element of the {@link #getSupportedMimeTypes()
+ * By default, this returns the first element of the {@link #getSupportedMimeTypes()
* supportedMimeTypes}, if any. Can be overridden in sub-classes.
- *
* @param payload the payload being converted to message
* @return the content type, or {@code null} if not known
*/
@@ -131,7 +125,6 @@ public abstract class AbstractMessageConverter implements MessageConverter {
/**
* Whether the given class is supported by this converter.
- *
* @param clazz the class to test for support
* @return {@code true} if supported; {@code false} otherwise
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/ByteArrayMessageConverter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/ByteArrayMessageConverter.java
index a2b9ae8ba4..c784cad6bb 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/ByteArrayMessageConverter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/ByteArrayMessageConverter.java
@@ -20,7 +20,6 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.util.MimeTypeUtils;
-
/**
* A {@link MessageConverter} that supports MIME type "application/octet-stream" with the
* payload converted to and from a byte[].
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/CompositeMessageConverter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/CompositeMessageConverter.java
index d3c41d8a98..ec0ab3d340 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/CompositeMessageConverter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/CompositeMessageConverter.java
@@ -24,7 +24,6 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.util.Assert;
-
/**
* A {@link MessageConverter} that delegates to a list of other converters to invoke until
* one of them returns a non-null value.
@@ -52,8 +51,8 @@ public class CompositeMessageConverter implements MessageConverter {
* the given {@link ContentTypeResolver}.
*/
public CompositeMessageConverter(Collection
- * If the converter does not support the specified media type or cannot perform the
+ * If the converter does not support the specified media type or cannot perform the
* conversion, it should return {@code null}.
- *
* @param message the input message
* @param targetClass the target class for the conversion
- *
* @return the result of the conversion or {@code null} if the converter cannot
- * perform the conversion
+ * perform the conversion
*/
Object fromMessage(Message> message, Class> targetClass);
@@ -53,15 +49,12 @@ public interface MessageConverter {
* may contain a {@link MessageHeaders#CONTENT_TYPE} header to specify the target
* media type for the conversion and it may contain additional headers to be added to
* the message.
- *
- * If the converter does not support the specified media type or cannot perform the
+ * If the converter does not support the specified media type or cannot perform the
* conversion, it should return {@code null}.
- *
* @param payload the Object to convert
* @param header optional headers for the message, may be {@code null}
- *
* @return the new message or {@code null} if the converter does not support the
- * Object type or the target media type
+ * Object type or the target media type
*/
Message> toMessage(Object payload, MessageHeaders header);
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/SimpleMessageConverter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/SimpleMessageConverter.java
index a6764862d7..2fc6db232a 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/SimpleMessageConverter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/SimpleMessageConverter.java
@@ -24,8 +24,8 @@ import org.springframework.util.ClassUtils;
/**
* A simple converter that simply unwraps the message payload as long as it matches the
* expected target class. Or reversely, simply wraps the payload in a message.
- *
- * Note that this converter ignores any content type information that may be present in
+ *
+ * Note that this converter ignores any content type information that may be present in
* message headers and should not be used if payload conversion is actually required.
*
* @author Rossen Stoyanchev
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/StringMessageConverter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/StringMessageConverter.java
index 965b9fd8e6..4e16f33ced 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/converter/StringMessageConverter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/converter/StringMessageConverter.java
@@ -22,7 +22,6 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.util.MimeType;
-
/**
* A {@link MessageConverter} that supports MIME type "text/plain" with the
* payload converted to and from a String.
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/AbstractPromiseToListenableFutureAdapter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/AbstractPromiseToListenableFutureAdapter.java
index 63e54893c1..7ccbd188ed 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/AbstractPromiseToListenableFutureAdapter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/AbstractPromiseToListenableFutureAdapter.java
@@ -46,8 +46,7 @@ abstract class AbstractPromiseToListenableFutureAdapter implements TcpOperations {
public ListenableFuture connectionHandler,
final ReconnectStrategy reconnectStrategy) {
- Assert.notNull(reconnectStrategy, "'reconnectStrategy' is required");
+ Assert.notNull(reconnectStrategy, "ReconnectStrategy must not be null");
Stream >> stream =
this.tcpClient.open(new Reconnect() {
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/ReconnectStrategy.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/ReconnectStrategy.java
index b81be7c79b..7a2178f53d 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/ReconnectStrategy.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/ReconnectStrategy.java
@@ -27,7 +27,6 @@ public interface ReconnectStrategy {
/**
* Return the time to the next attempt to reconnect.
- *
* @param attemptCount how many reconnect attempts have been made already
* @return the amount of time in milliseconds or {@code null} to stop
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpConnection.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpConnection.java
index 603fd1df63..8e88abdd8e 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpConnection.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpConnection.java
@@ -32,9 +32,8 @@ public interface TcpConnection {
/**
* Send the given message.
* @param message the message
- *
* @return a ListenableFuture that can be used to determine when and if the
- * message was successfully sent
+ * message was successfully sent
*/
ListenableFuture message);
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpOperations.java
index 86cbd9f425..4d9d7a6b4a 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/TcpOperations.java
@@ -30,30 +30,25 @@ public interface TcpOperations {
/**
* Open a new connection.
- *
* @param connectionHandler a handler to manage the connection
- *
* @return a ListenableFuture that can be used to determine when and if the
- * connection is successfully established
+ * connection is successfully established
*/
ListenableFuture connectionHandler);
/**
* Open a new connection and a strategy for reconnecting if the connection fails.
- *
* @param connectionHandler a handler to manage the connection
* @param reconnectStrategy a strategy for reconnecting
- *
* @return a ListenableFuture that can be used to determine when and if the
- * initial connection is successfully established
+ * initial connection is successfully established
*/
ListenableFuture connectionHandler, ReconnectStrategy reconnectStrategy);
/**
* Shut down and close any open connections.
- *
* @return a ListenableFuture that can be used to determine when and if the
- * connection is successfully closed
+ * connection is successfully closed
*/
ListenableFuture The returned request can be written to, and then executed by calling
* {@link AsyncClientHttpRequest#executeAsync()}.
- *
* @param uri the URI to create a request for
* @param httpMethod the HTTP method to execute
* @return the created request
diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
index 198c60bf16..9fef0a61e7 100644
--- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
+++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
/**
* Asynchronous extension of the {@link HttpComponentsClientHttpRequestFactory}. Uses
- * Apache HttpComponents
+ * Apache HttpComponents
* HttpAsyncClient 4.0 to create requests.
*
* @author Arjen Poutsma
diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java
index 64d4b0b5e0..6be05620ba 100644
--- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java
+++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java
@@ -39,11 +39,11 @@ import org.springframework.http.StreamingHttpOutputMessage;
* {@link ClientHttpRequest} implementation that uses Apache HttpComponents HttpClient to
* execute requests.
*
- * Created via the {@link org.springframework.http.client.HttpComponentsClientHttpRequestFactory}.
+ * Created via the
+ * {@link org.springframework.http.client.HttpComponentsClientHttpRequestFactory}.
*
* @author Arjen Poutsma
- * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory#createRequest(java.net.URI,
- * org.springframework.http.HttpMethod)
+ * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory#createRequest(java.net.URI, org.springframework.http.HttpMethod)
* @since 4.0
*/
final class HttpComponentsStreamingClientHttpRequest extends AbstractClientHttpRequest
diff --git a/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java b/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java
index e2a95d9780..cf75376462 100644
--- a/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java
+++ b/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java
@@ -65,7 +65,6 @@ public class AsyncHttpAccessor {
/**
* Create a new {@link AsyncClientHttpRequest} via this template's {@link
* AsyncClientHttpRequestFactory}.
- *
* @param url the URL to connect to
* @param method the HTTP method to execute (GET, POST, etc.)
* @return the created request
diff --git a/spring-web/src/main/java/org/springframework/http/server/ServerHttpAsyncRequestControl.java b/spring-web/src/main/java/org/springframework/http/server/ServerHttpAsyncRequestControl.java
index 79dfd55c3b..5fc6a9f8d2 100644
--- a/spring-web/src/main/java/org/springframework/http/server/ServerHttpAsyncRequestControl.java
+++ b/spring-web/src/main/java/org/springframework/http/server/ServerHttpAsyncRequestControl.java
@@ -15,7 +15,6 @@
*/
package org.springframework.http.server;
-
/**
* A control that can put the processing of an HTTP request in asynchronous mode during
* which the response remains open until explicitly closed.
diff --git a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java
index f7f0b91d95..b9087a9050 100644
--- a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java
+++ b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java
@@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.util.Assert;
-
/**
* A {@link ServerHttpAsyncRequestControl} to use on Servlet containers (Servlet 3.0+).
*
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java
index e5bac276c2..0180582436 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java
@@ -63,7 +63,6 @@ public @interface ControllerAdvice {
* Allows for more concise annotation declarations e.g.:
* {@code @ControllerAdvice("org.my.pkg")} is equivalent to
* {@code @ControllerAdvice(basePackages="org.my.pkg")}.
- *
* @since 4.0
*/
String[] value() default {};
@@ -73,11 +72,9 @@ public @interface ControllerAdvice {
* Controllers that belong to those base packages will be included, e.g.:
* {@code @ControllerAdvice(basePackages="org.my.pkg")} or
* {@code @ControllerAdvice(basePackages={"org.my.pkg","org.my.other.pkg"})}
- *
* {@link #value()} is an alias for this attribute.
* Also consider using {@link #basePackageClasses()} as a type-safe
* alternative to String-based package names.
- *
* @since 4.0
*/
String[] basePackages() default {};
@@ -86,10 +83,8 @@ public @interface ControllerAdvice {
* Type-safe alternative to {@link #value()} for specifying the packages
* to select Controllers to be assisted by the {@code @ControllerAdvice}
* annotated class.
- *
* Consider creating a special no-op marker class or interface in each package
* that serves no purpose other than being referenced by this attribute.
- *
* @since 4.0
*/
Class>[] basePackageClasses() default {};
@@ -98,7 +93,6 @@ public @interface ControllerAdvice {
* Array of classes.
* Controllers that are assignable to at least one of the given types
* will be assisted by the {@code @ControllerAdvice} annotated class.
- *
* @since 4.0
*/
Class>[] assignableTypes() default {};
diff --git a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java
index b82f31bd36..1ccee63b8c 100644
--- a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java
+++ b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java
@@ -188,7 +188,6 @@ public class ControllerAdviceBean implements Ordered {
/**
* Checks whether the given bean type should be assisted by this
* {@code @ControllerAdvice} instance.
- *
* @param beanType the type of the bean to check
* @see org.springframework.web.bind.annotation.ControllerAdvice
* @since 4.0
diff --git a/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java b/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java
index dfccebd7d2..11e890bd9a 100644
--- a/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java
+++ b/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java
@@ -48,7 +48,6 @@ public class CompositeUriComponentsContributor implements UriComponentsContribut
* by the same class, the most convenient option is to obtain the configured
* {@code HandlerMethodArgumentResolvers} in {@code RequestMappingHandlerAdapter} and
* provide that to this constructor.
- *
* @param contributors a collection of {@link UriComponentsContributor}
* or {@link HandlerMethodArgumentResolver}s.
*/
@@ -62,15 +61,13 @@ public class CompositeUriComponentsContributor implements UriComponentsContribut
* by the same class, the most convenient option is to obtain the configured
* {@code HandlerMethodArgumentResolvers} in the {@code RequestMappingHandlerAdapter}
* and provide that to this constructor.
- *
- * If the {@link ConversionService} argument is {@code null},
+ * If the {@link ConversionService} argument is {@code null},
* {@link org.springframework.format.support.DefaultFormattingConversionService}
* will be used by default.
- *
* @param contributors a collection of {@link UriComponentsContributor}
- * or {@link HandlerMethodArgumentResolver}s.
+ * or {@link HandlerMethodArgumentResolver}s.
* @param conversionService a ConversionService to use when method argument values
- * need to be formatted as Strings before being added to the URI
+ * need to be formatted as Strings before being added to the URI
*/
public CompositeUriComponentsContributor(Collection> contributors, ConversionService conversionService) {
diff --git a/spring-web/src/main/java/org/springframework/web/method/support/UriComponentsContributor.java b/spring-web/src/main/java/org/springframework/web/method/support/UriComponentsContributor.java
index 1fdb3d5810..61149b1b01 100644
--- a/spring-web/src/main/java/org/springframework/web/method/support/UriComponentsContributor.java
+++ b/spring-web/src/main/java/org/springframework/web/method/support/UriComponentsContributor.java
@@ -43,7 +43,6 @@ public interface UriComponentsContributor {
* Process the given method argument and either update the
* {@link UriComponentsBuilder} or add to the map with URI variables to use to
* expand the URI after all arguments are processed.
- *
* @param parameter the controller method parameter, never {@literal null}.
* @param value the argument value, possibly {@literal null}.
* @param builder the builder to update, never {@literal null}.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
index 665b2a2a2e..e2ffc308a4 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
@@ -416,12 +416,10 @@ public class DispatcherServlet extends FrameworkServlet {
* Set whether to throw a NoHandlerFoundException when no Handler was found for this request.
* This exception can then be caught with a HandlerExceptionResolver or an
* {@code @ExceptionHandler} controller method.
- *
* Note that if
* {@link org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler}
* is used, then requests will always be forwarded to the default servlet and
* a NoHandlerFoundException would never be thrown in that case.
- *
* Default is "false", meaning the DispatcherServlet sends a NOT_FOUND error
* through the Servlet response.
* @since 4.0
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
index b38e52a033..6dde6d8dc1 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
@@ -1056,10 +1056,8 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
* Spring Beans inside an existing {@link WebApplicationContext} rather than
* {@link #findWebApplicationContext() finding} a
* {@link org.springframework.web.context.ContextLoaderListener bootstrapped} context.
- *
* Primarily added to support use in embedded servlet containers, this method is not
* intended to be called directly.
- *
* @since 4.0
*/
@Override
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java
index 5c8989b633..b6df9f9016 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java
@@ -20,10 +20,9 @@ import javax.servlet.ServletException;
import org.springframework.http.HttpHeaders;
/**
- * Exception to be thrown if DispatcherServlet is unable to determine
- * a corresponding handler for an incoming HTTP request.
- * The DispatcherServlet throws this exception only if its
- * throwExceptionIfNoHandlerFound property is set to "true".
+ * Exception to be thrown if DispatcherServlet is unable to determine a corresponding
+ * handler for an incoming HTTP request. The DispatcherServlet throws this exception only
+ * if its throwExceptionIfNoHandlerFound property is set to "true".
*
* @author Brian Clozel
* @since 4.0
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java
index 9afa51046f..26a940a87c 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java
@@ -57,7 +57,6 @@ import java.util.*;
*
* @since 4.0
*/
-
public class MvcUriComponentsBuilder extends UriComponentsBuilder {
/**
@@ -90,9 +89,7 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
* resulting builder contains the current request information up to and including
* the Servlet mapping plus any type-level request mapping. If the controller
* contains multiple mappings, the first one is used.
- *
* @param controllerType the controller to create a URI for
- *
* @return a UriComponentsBuilder instance
*/
public static UriComponentsBuilder fromController(Class> controllerType) {
@@ -106,18 +103,14 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
* method name and the number of argument values. If that results in a clash
* (i.e. overloaded methods with the same number of parameters), use
* {@link #fromMethod(java.lang.reflect.Method, Object...)} instead.
- *
- * The argument values are used to prepare the URI for example expanding
+ * The argument values are used to prepare the URI for example expanding
* path variables, or adding query parameters. Any other arguments not
* relevant to the URI can be provided as {@literal null} and will be ignored.
- *
- * Additional (custom) argument types can be supported through an implementation
+ * Additional (custom) argument types can be supported through an implementation
* of {@link org.springframework.web.method.support.UriComponentsContributor}.
- *
* @param controllerType the target controller type
* @param methodName the target method name
* @param argumentValues argument values matching to method parameters
- *
* @return a UriComponentsBuilder instance
*/
public static UriComponentsBuilder fromMethodName(Class> controllerType,
@@ -147,13 +140,10 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
* prepare the URI for example expanding path variables, or adding request
* parameters. Any other arguments not relevant to the URL can be provided as
* {@literal null} and will be ignored.
- *
- * Additional (custom) argument types can be supported through an implementation
+ * Additional (custom) argument types can be supported through an implementation
* of {@link org.springframework.web.method.support.UriComponentsContributor}.
- *
* @param method the target controller method
* @param argumentValues argument values matching to method parameters
- *
* @return a UriComponentsBuilder instance
*/
public static UriComponentsBuilder fromMethod(Method method, Object... argumentValues) {
@@ -172,8 +162,7 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
/**
* Create a {@link UriComponents} by invoking a method on a "mock" controller, similar
* to how test frameworks provide mock objects and record method invocations.
- *
- * For example given this controller:
+ * For example given this controller:
*
*
- * Additional (custom) argument types can be supported through an implementation
+ * Additional (custom) argument types can be supported through an implementation
* of {@link org.springframework.web.method.support.UriComponentsContributor}.
- *
* @param methodInvocationInfo either the value returned from a "mock" controller
- * invocation or the "mock" controller itself after an invocation
- *
+ * invocation or the "mock" controller itself after an invocation
* @return a UriComponents instance
*/
public static UriComponentsBuilder fromMethodCall(Object methodInvocationInfo) {
@@ -320,15 +306,12 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
* on the controller is invoked, the supplied argument values are remembered
* and the result can then be used to prepare a URL to the method via
* {@link #fromMethodCall(Object)}.
- *
- * This is a shorthand version of {@link #controller(Class)} intended for
+ * This is a shorthand version of {@link #controller(Class)} intended for
* inline use as follows:
- *
*
- * This is a longer version of {@link #on(Class)} for use with void controller
+ * This is a longer version of {@link #on(Class)} for use with void controller
* methods as well as for creating multiple links in succession.
- *
*
- * Implementations of this interface are encouraged to handle exceptions locally where
+ *
+ * Implementations of this interface are encouraged to handle exceptions locally where
* it makes sense or alternatively let the exception bubble up in which case by default
* the exception is logged and the session closed with
* {@link CloseStatus#SERVER_ERROR SERVER_ERROR(1011)}. The exception handling
@@ -38,21 +38,21 @@ public interface WebSocketHandler {
* Invoked after WebSocket negotiation has succeeded and the WebSocket connection is
* opened and ready for use.
* @throws Exception this method can handle or propagate exceptions; see class-level
- * Javadoc for details.
+ * Javadoc for details.
*/
void afterConnectionEstablished(WebSocketSession session) throws Exception;
/**
* Invoked when a new WebSocket message arrives.
* @throws Exception this method can handle or propagate exceptions; see class-level
- * Javadoc for details.
+ * Javadoc for details.
*/
void handleMessage(WebSocketSession session, WebSocketMessage> message) throws Exception;
/**
* Handle an error from the underlying WebSocket message transport.
* @throws Exception this method can handle or propagate exceptions; see class-level
- * Javadoc for details.
+ * Javadoc for details.
*/
void handleTransportError(WebSocketSession session, Throwable exception) throws Exception;
@@ -61,9 +61,8 @@ public interface WebSocketHandler {
* transport error has occurred. Although the session may technically still be open,
* depending on the underlying implementation, sending messages at this point is
* discouraged and most likely will not succeed.
- *
* @throws Exception this method can handle or propagate exceptions; see class-level
- * Javadoc for details.
+ * Javadoc for details.
*/
void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSesssion.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSesssion.java
index 99128a65f3..b3ee658673 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSesssion.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSesssion.java
@@ -46,9 +46,8 @@ public abstract class AbstractWebSocketSesssion Default is "false".
*/
public void setAutoStartup(boolean autoStartup) {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java
index e7ee361b5f..4b83bd259f 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java
@@ -30,7 +30,6 @@ import org.springframework.web.socket.support.WebSocketHttpHeaders;
*
* @author Rossen Stoyanchev
* @since 4.0
- *
* @see WebSocketConnectionManager
*/
public interface WebSocketClient {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketConnectionManager.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketConnectionManager.java
index 7a115312e2..c0ae96f8a6 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketConnectionManager.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketConnectionManager.java
@@ -61,7 +61,6 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
/**
* Decorate the WebSocketHandler provided to the class constructor.
- *
* By default {@link LoggingWebSocketHandlerDecorator} is added.
*/
protected WebSocketHandler decorateWebSocketHandler(WebSocketHandler handler) {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/AnnotatedEndpointConnectionManager.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/AnnotatedEndpointConnectionManager.java
index 5ba8cf6280..b2fe7cad86 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/AnnotatedEndpointConnectionManager.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/AnnotatedEndpointConnectionManager.java
@@ -85,7 +85,7 @@ public class AnnotatedEndpointConnectionManager extends ConnectionManagerSupport
* By default {@link SimpleAsyncTaskExecutor} is used.
*/
public void setTaskExecutor(TaskExecutor taskExecutor) {
- Assert.notNull(taskExecutor, "taskExecutor is required");
+ Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/EndpointConnectionManager.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/EndpointConnectionManager.java
index 1b32306396..ecdb198d3f 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/EndpointConnectionManager.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/EndpointConnectionManager.java
@@ -118,7 +118,7 @@ public class EndpointConnectionManager extends ConnectionManagerSupport implemen
* By default {@link SimpleAsyncTaskExecutor} is used.
*/
public void setTaskExecutor(TaskExecutor taskExecutor) {
- Assert.notNull(taskExecutor, "taskExecutor is required");
+ Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/StandardWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/StandardWebSocketClient.java
index 55421c5866..2d668b8d59 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/StandardWebSocketClient.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/endpoint/StandardWebSocketClient.java
@@ -76,12 +76,13 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
this.webSocketContainer = webSocketContainer;
}
+
/**
* Set a {@link TaskExecutor} to use to open the connection.
* By default {@link SimpleAsyncTaskExecutor} is used.
*/
public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) {
- Assert.notNull(taskExecutor, "taskExecutor is required");
+ Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java
index d76ec05d0a..c3663ab9f9 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java
@@ -84,7 +84,7 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma
* By default {@link SimpleAsyncTaskExecutor} is used.
*/
public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) {
- Assert.notNull(taskExecutor, "taskExecutor is required");
+ Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
@@ -200,7 +200,7 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma
/**
* @return the user to make available through {@link WebSocketSession#getPrincipal()};
- * by default this method returns {@code null}
+ * by default this method returns {@code null}
*/
protected Principal getUser() {
return null;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java
index d8eb8f30ae..76fe925545 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java
@@ -24,7 +24,6 @@ import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;
-
/**
* A contract for handling WebSocket messages as part of a higher level protocol, referred
* to as "sub-protocol" in the WebSocket RFC specification. Handles both
@@ -49,7 +48,6 @@ public interface SubProtocolHandler {
/**
* Handle the given {@link WebSocketMessage} received from a client.
- *
* @param session the client session
* @param message the client message
* @param outputChannel an output channel to send messages to
@@ -60,7 +58,6 @@ public interface SubProtocolHandler {
/**
* Handle the given {@link Message} to the client associated with the given WebSocket
* session.
- *
* @param session the client session
* @param message the client message
*/
@@ -68,14 +65,12 @@ public interface SubProtocolHandler {
/**
* Resolve the session id from the given message or return {@code null}.
- *
* @param message the message to resolve the session id from
*/
String resolveSessionId(Message> message);
/**
* Invoked after a {@link WebSocketSession} has started.
- *
* @param session the client session
* @param outputChannel a channel
*/
@@ -83,7 +78,6 @@ public interface SubProtocolHandler {
/**
* Invoked after a {@link WebSocketSession} has ended.
- *
* @param session the client session
* @param closeStatus the reason why the session was closed
* @param outputChannel a channel
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java
index bd521bbbe5..eb11a03625 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java
@@ -34,7 +34,6 @@ import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.support.SubProtocolCapable;
-
/**
* An implementation of {@link WebSocketHandler} that delegates incoming WebSocket
* messages to a {@link SubProtocolHandler} along with a {@link MessageChannel} to
@@ -66,7 +65,7 @@ public class SubProtocolWebSocketHandler implements SubProtocolCapable, WebSocke
public SubProtocolWebSocketHandler(MessageChannel clientOutboundChannel) {
- Assert.notNull(clientOutboundChannel, "clientOutboundChannel is required");
+ Assert.notNull(clientOutboundChannel, "ClientOutboundChannel must not be null");
this.clientOutboundChannel = clientOutboundChannel;
}
@@ -74,7 +73,6 @@ public class SubProtocolWebSocketHandler implements SubProtocolCapable, WebSocke
/**
* Configure one or more handlers to use depending on the sub-protocol requested by
* the client in the WebSocket handshake request.
- *
* @param protocolHandlers the sub-protocol handlers to use
*/
public void setProtocolHandlers(List
- * The default value is 1.
+ * The default value is 1.
*/
public void setOrder(int order) {
this.order = order;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebMvcStompWebSocketEndpointRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebMvcStompWebSocketEndpointRegistration.java
index 6f0c04114c..904227efc3 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebMvcStompWebSocketEndpointRegistration.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebMvcStompWebSocketEndpointRegistration.java
@@ -16,16 +16,12 @@
package org.springframework.web.socket.messaging.config;
-import java.util.Set;
-
import org.springframework.scheduling.TaskScheduler;
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
-import org.springframework.util.ObjectUtils;
import org.springframework.web.HttpRequestHandler;
import org.springframework.web.socket.WebSocketHandler;
-import org.springframework.web.socket.server.DefaultHandshakeHandler;
import org.springframework.web.socket.server.HandshakeHandler;
import org.springframework.web.socket.server.config.SockJsServiceRegistration;
import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler;
@@ -33,7 +29,6 @@ import org.springframework.web.socket.sockjs.SockJsHttpRequestHandler;
import org.springframework.web.socket.sockjs.SockJsService;
import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler;
-
/**
* An abstract base class class for configuring STOMP over WebSocket/SockJS endpoints.
*
@@ -57,7 +52,7 @@ public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketE
TaskScheduler sockJsTaskScheduler) {
Assert.notEmpty(paths, "No paths specified");
- Assert.notNull(webSocketHandler, "'webSocketHandler' is required");
+ Assert.notNull(webSocketHandler, "WebSocketHandler must not be null");
this.paths = paths;
this.webSocketHandler = webSocketHandler;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebSocketMessageBrokerConfigurationSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebSocketMessageBrokerConfigurationSupport.java
index 0461099bcd..22e55d63ad 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebSocketMessageBrokerConfigurationSupport.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebSocketMessageBrokerConfigurationSupport.java
@@ -24,7 +24,6 @@ import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.server.config.SockJsServiceRegistration;
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
-
/**
* Extends {@link AbstractMessageBrokerConfiguration} and adds configuration for
* receiving and responding to STOMP messages from WebSocket clients.
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/DefaultHandshakeHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/DefaultHandshakeHandler.java
index c886c50574..99ca0e4d29 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/server/DefaultHandshakeHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/DefaultHandshakeHandler.java
@@ -45,8 +45,7 @@ import org.springframework.web.socket.support.WebSocketHttpHeaders;
* negotiation process (e.g. origin validation, sub-protocol negotiation,
* extensions negotiation, etc).
*
- *
- * If the negotiation succeeds, the actual upgrade is delegated to a server-specific
+ * If the negotiation succeeds, the actual upgrade is delegated to a server-specific
* {@link RequestUpgradeStrategy}, which will update the response as necessary and
* initialize the WebSocket. Currently supported servers are Tomcat 7 and 8, Jetty 9, and
* Glassfish 4.
@@ -76,11 +75,9 @@ public class DefaultHandshakeHandler implements HandshakeHandler {
private final List
- * Note that if the WebSocketHandler passed in at runtime is an instance of
+ * Note that if the WebSocketHandler passed in at runtime is an instance of
* {@link SubProtocolCapable} then there is not need to explicitly configure
* this property. That is certainly the case with the built-in STOMP over
* WebSocket support. Therefore this property should be configured explicitly
@@ -263,11 +260,9 @@ public class DefaultHandshakeHandler implements HandshakeHandler {
* WebSocketHandler is a {@link SubProtocolCapable} and then also checks if any
* sub-protocols have been explicitly configured with
* {@link #setSupportedProtocols(String...)}.
- *
* @param requestedProtocols the requested sub-protocols
* @param webSocketHandler the WebSocketHandler that will be used
* @return the selected protocols or {@code null}
- *
* @see #determineHandlerSupportedProtocols(org.springframework.web.socket.WebSocketHandler)
*/
protected String selectProtocol(List
- * By default all request extensions are returned. The WebSocket server will further
+ * By default all request extensions are returned. The WebSocket server will further
* compare the requested extensions against the list of supported extensions and
* return only the ones that are both requested and supported.
- *
* @param request the current request
* @param requested the list of extensions requested by the client
* @param supported the list of extensions supported by the server
- *
* @return the selected extensions or an empty list
*/
protected List By default this is set to point to
* "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js".
*/
@@ -96,7 +94,6 @@ public class SockJsServiceRegistration {
* closed. After that client will open a new request. Setting this value to
* one effectively disables streaming and will make streaming transports to
* behave like polling transports.
- *
* The default value is 128K (i.e. 128 * 1024).
*/
public SockJsServiceRegistration setStreamBytesLimit(int streamBytesLimit) {
@@ -109,13 +106,11 @@ public class SockJsServiceRegistration {
* from clients with a "cookie_needed" boolean property that indicates whether the use
* of a JSESSIONID cookie is required for the application to function correctly, e.g.
* for load balancing or in Java Servlet containers for the use of an HTTP session.
- *
- * This is especially important for IE 8,9 that support XDomainRequest -- a modified
+ * This is especially important for IE 8,9 that support XDomainRequest -- a modified
* AJAX/XHR -- that can do requests across domains but does not send any cookies. In
* those cases, the SockJS client prefers the "iframe-htmlfile" transport over
* "xdr-streaming" in order to be able to send cookies.
- *
- * The default value is "true" to maximize the chance for applications to work
+ * The default value is "true" to maximize the chance for applications to work
* correctly in IE 8,9 with support for cookies (and the JSESSIONID cookie in
* particular). However, an application can choose to set this to "false" if the use
* of cookies (and HTTP session) is not required.
@@ -129,7 +124,6 @@ public class SockJsServiceRegistration {
* The amount of time in milliseconds when the server has not sent any
* messages and after which the server should send a heartbeat frame to the
* client in order to keep the connection from breaking.
- *
* The default value is 25,000 (25 seconds).
*/
public SockJsServiceRegistration setHeartbeatTime(long heartbeatTime) {
@@ -141,7 +135,6 @@ public class SockJsServiceRegistration {
* The amount of time in milliseconds before a client is considered
* disconnected after not having a receiving connection, i.e. an active
* connection over which the server can send data to the client.
- *
* The default value is 5000.
*/
public SockJsServiceRegistration setDisconnectDelay(long disconnectDelay) {
@@ -153,12 +146,10 @@ public class SockJsServiceRegistration {
* The number of server-to-client messages that a session can cache while waiting for
* the next HTTP polling request from the client. All HTTP transports use this
* property since even streaming transports recycle HTTP requests periodically.
- *
- * The amount of time between HTTP requests should be relatively brief and will not
+ * The amount of time between HTTP requests should be relatively brief and will not
* exceed the allows disconnect delay (see
* {@link #setDisconnectDelay(long)}), 5 seconds by default.
- *
- * The default size is 100.
+ * The default size is 100.
*/
public SockJsServiceRegistration setHttpMessageCacheSize(int httpMessageCacheSize) {
this.httpMessageCacheSize = httpMessageCacheSize;
@@ -168,7 +159,6 @@ public class SockJsServiceRegistration {
/**
* Some load balancers don't support WebSocket. This option can be used to
* disable the WebSocket transport on the server side.
- *
* The default value is "true".
*/
public SockJsServiceRegistration setWebSocketEnabled(boolean webSocketEnabled) {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurationSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurationSupport.java
index 8dc2188847..55b8cc50b3 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurationSupport.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurationSupport.java
@@ -21,7 +21,6 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
-
/**
* Configuration support for WebSocket request handling.
*
@@ -30,7 +29,6 @@ import org.springframework.web.servlet.handler.AbstractHandlerMapping;
*/
public class WebSocketConfigurationSupport {
-
@Bean
public HandlerMapping webSocketHandlerMapping() {
ServletWebSocketHandlerRegistry registry = new ServletWebSocketHandlerRegistry(defaultSockJsTaskScheduler());
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurer.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurer.java
index 221ac25634..698b241a7d 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurer.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/config/WebSocketConfigurer.java
@@ -18,7 +18,6 @@ package org.springframework.web.socket.server.config;
import org.springframework.web.socket.WebSocketHandler;
-
/**
* Defines callback methods to configure the WebSocket request handling
* via {@link EnableWebSocket @EnableWebSocket}.
@@ -28,7 +27,6 @@ import org.springframework.web.socket.WebSocketHandler;
*/
public interface WebSocketConfigurer {
-
/**
* Register {@link WebSocketHandler}s including SockJS fallback options if desired.
*/
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/endpoint/ServerEndpointExporter.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/endpoint/ServerEndpointExporter.java
index 1b03a81f61..eb050dc65b 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/server/endpoint/ServerEndpointExporter.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/endpoint/ServerEndpointExporter.java
@@ -73,7 +73,6 @@ public class ServerEndpointExporter implements InitializingBean, BeanPostProcess
* Explicitly list annotated endpoint types that should be registered on startup. This
* can be done if you wish to turn off a Servlet container's scan for endpoints, which
* goes through all 3rd party jars in the, and rely on Spring configuration instead.
- *
* @param annotatedEndpointClasses {@link ServerEndpoint}-annotated types
*/
public void setAnnotatedEndpointClasses(Class>... annotatedEndpointClasses) {
@@ -83,11 +82,8 @@ public class ServerEndpointExporter implements InitializingBean, BeanPostProcess
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
-
this.applicationContext = applicationContext;
-
this.serverContainer = getServerContainer();
-
Map
- * The SockJS session is not automatically closed after this exception.
+ *
+ * The SockJS session is not automatically closed after this exception.
*
* @author Rossen Stoyanchev
* @since 4.0
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java
index d13ee388ab..b6acc14d36 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java
@@ -23,8 +23,8 @@ import org.springframework.web.socket.support.ExceptionWebSocketHandlerDecorator
/**
* The main entry point for processing HTTP requests from SockJS clients.
- *
- * In a Servlet 3+ container, {@link SockJsHttpRequestHandler} can be used to invoke this
+ *
+ * In a Servlet 3+ container, {@link SockJsHttpRequestHandler} can be used to invoke this
* service. The processing servlet, as well as all filters involved, must have
* asynchronous support enabled through the ServletContext API or by adding an
* {@code
- * See the "Base URL", "Static URLs", and "Session URLs" sections of the See the "Base URL", "Static URLs", and "Session URLs" sections of the SockJS
* protocol for details on the types of URLs expected.
- *
* @param request the current request
* @param response the current response
* @param sockJsPath the remainder of the path within the SockJS service prefix
* @param handler the handler that will exchange messages with the SockJS client
- *
* @throws SockJsException raised when request processing fails; generally, failed
- * attempts to send messages to clients automatically close the SockJS session
- * and raise {@link SockJsTransportFailureException}; failed attempts to read
- * messages from clients do not automatically close the session and may result
- * in {@link SockJsMessageDeliveryException} or {@link SockJsException};
- * exceptions from the WebSocketHandler can be handled internally or through
- * {@link ExceptionWebSocketHandlerDecorator} or some alternative decorator.
- * The former is automatically added when using
- * {@link SockJsHttpRequestHandler}.
+ * attempts to send messages to clients automatically close the SockJS session
+ * and raise {@link SockJsTransportFailureException}; failed attempts to read
+ * messages from clients do not automatically close the session and may result
+ * in {@link SockJsMessageDeliveryException} or {@link SockJsException};
+ * exceptions from the WebSocketHandler can be handled internally or through
+ * {@link ExceptionWebSocketHandlerDecorator} or some alternative decorator.
+ * The former is automatically added when using
+ * {@link SockJsHttpRequestHandler}.
*/
void handleRequest(ServerHttpRequest request, ServerHttpResponse response, String sockJsPath,
WebSocketHandler handler) throws SockJsException;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java
index 55342e976b..0e003a6aa1 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java
@@ -16,7 +16,6 @@
package org.springframework.web.socket.sockjs;
-
/**
* Indicates a serious failure that occurred in the SockJS implementation as opposed to in
* user code (e.g. IOException while writing to the response). When this exception is
@@ -28,7 +27,6 @@ package org.springframework.web.socket.sockjs;
@SuppressWarnings("serial")
public class SockJsTransportFailureException extends SockJsException {
-
public SockJsTransportFailureException(String message, String sessionId, Throwable cause) {
super(message, sessionId, cause);
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
index 101b2cd773..40a538edb0 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -102,7 +102,6 @@ public abstract class AbstractSockJsService implements SockJsService {
* a domain local to the SockJS server. The iframe does need to load the
* SockJS javascript client library and this option allows configuring its
* url.
- *
* By default this is set to point to
* "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js".
*/
@@ -126,7 +125,6 @@ public abstract class AbstractSockJsService implements SockJsService {
* closed. After that client will open a new request. Setting this value to
* one effectively disables streaming and will make streaming transports to
* behave like polling transports.
- *
* The default value is 128K (i.e. 128 * 1024).
*/
public void setStreamBytesLimit(int streamBytesLimit) {
@@ -142,17 +140,14 @@ public abstract class AbstractSockJsService implements SockJsService {
* clients with a "cookie_needed" boolean property that indicates whether the use of a
* JSESSIONID cookie is required for the application to function correctly, e.g. for
* load balancing or in Java Servlet containers for the use of an HTTP session.
- *
- * This is especially important for IE 8,9 that support XDomainRequest -- a modified
+ * This is especially important for IE 8,9 that support XDomainRequest -- a modified
* AJAX/XHR -- that can do requests across domains but does not send any cookies. In
* those cases, the SockJS client prefers the "iframe-htmlfile" transport over
* "xdr-streaming" in order to be able to send cookies.
- *
- * The SockJS protocol also expects a SockJS service to echo back the JSESSIONID
+ * The SockJS protocol also expects a SockJS service to echo back the JSESSIONID
* cookie when this property is set to true. However, when running in a Servlet
* container this is not necessary since the container takes care of it.
- *
- * The default value is "true" to maximize the chance for applications to work
+ * The default value is "true" to maximize the chance for applications to work
* correctly in IE 8,9 with support for cookies (and the JSESSIONID cookie in
* particular). However, an application can choose to set this to "false" if
* the use of cookies (and HTTP session) is not required.
@@ -173,7 +168,6 @@ public abstract class AbstractSockJsService implements SockJsService {
* The amount of time in milliseconds when the server has not sent any
* messages and after which the server should send a heartbeat frame to the
* client in order to keep the connection from breaking.
- *
* The default value is 25,000 (25 seconds).
*/
public void setHeartbeatTime(long heartbeatTime) {
@@ -195,7 +189,6 @@ public abstract class AbstractSockJsService implements SockJsService {
* The amount of time in milliseconds before a client is considered
* disconnected after not having a receiving connection, i.e. an active
* connection over which the server can send data to the client.
- *
* The default value is 5000.
*/
public void setDisconnectDelay(long disconnectDelay) {
@@ -213,12 +206,10 @@ public abstract class AbstractSockJsService implements SockJsService {
* The number of server-to-client messages that a session can cache while waiting for
* the next HTTP polling request from the client. All HTTP transports use this
* property since even streaming transports recycle HTTP requests periodically.
- *
- * The amount of time between HTTP requests should be relatively brief and will not
+ * The amount of time between HTTP requests should be relatively brief and will not
* exceed the allows disconnect delay (see
* {@link #setDisconnectDelay(long)}), 5 seconds by default.
- *
- * The default size is 100.
+ * The default size is 100.
*/
public void setHttpMessageCacheSize(int httpMessageCacheSize) {
this.httpMessageCacheSize = httpMessageCacheSize;
@@ -234,7 +225,6 @@ public abstract class AbstractSockJsService implements SockJsService {
/**
* Some load balancers don't support websockets. This option can be used to
* disable the WebSocket transport on the server side.
- *
* The default value is "true".
*/
public void setWebSocketsEnabled(boolean webSocketsEnabled) {
@@ -251,9 +241,8 @@ public abstract class AbstractSockJsService implements SockJsService {
/**
* {@inheritDoc}
- *
- * This method determines the SockJS path and handles SockJS static URLs. Session URLs
- * and raw WebSocket requests are delegated to abstract methods.
+ * This method determines the SockJS path and handles SockJS static URLs. Session
+ * URLs and raw WebSocket requests are delegated to abstract methods.
*/
@Override
public final void handleRequest(ServerHttpRequest request, ServerHttpResponse response,
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/AbstractSockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/AbstractSockJsMessageCodec.java
index c3b3a7087d..87b93dc706 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/AbstractSockJsMessageCodec.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/AbstractSockJsMessageCodec.java
@@ -18,7 +18,6 @@ package org.springframework.web.socket.sockjs.support.frame;
import org.springframework.util.Assert;
-
/**
* An base class for SockJS message codec that provides an implementation of
* {@link #encode(String[])}.
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/Jackson2SockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/Jackson2SockJsMessageCodec.java
index 04699413d1..edd1fbb720 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/Jackson2SockJsMessageCodec.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/Jackson2SockJsMessageCodec.java
@@ -24,7 +24,6 @@ import org.springframework.util.Assert;
import com.fasterxml.jackson.core.io.JsonStringEncoder;
import com.fasterxml.jackson.databind.ObjectMapper;
-
/**
* A Jackson 2 codec for encoding and decoding SockJS messages.
*
@@ -41,7 +40,7 @@ public class Jackson2SockJsMessageCodec extends AbstractSockJsMessageCodec {
}
public Jackson2SockJsMessageCodec(ObjectMapper objectMapper) {
- Assert.notNull(objectMapper, "objectMapper is required");
+ Assert.notNull(objectMapper, "ObjectMapper must not be null");
this.objectMapper = objectMapper;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/JacksonSockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/JacksonSockJsMessageCodec.java
index 6f5ed64490..a16a180cfc 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/JacksonSockJsMessageCodec.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/JacksonSockJsMessageCodec.java
@@ -23,7 +23,6 @@ import org.codehaus.jackson.io.JsonStringEncoder;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.util.Assert;
-
/**
* A Jackson 1.x codec for encoding and decoding SockJS messages.
*
@@ -40,7 +39,7 @@ public class JacksonSockJsMessageCodec extends AbstractSockJsMessageCodec {
}
public JacksonSockJsMessageCodec(ObjectMapper objectMapper) {
- Assert.notNull(objectMapper, "objectMapper is required");
+ Assert.notNull(objectMapper, "ObjectMapper must not be null");
this.objectMapper = objectMapper;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsFrame.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsFrame.java
index fe51bdc3d5..8f6d39e3e6 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsFrame.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsFrame.java
@@ -41,7 +41,7 @@ public class SockJsFrame {
private SockJsFrame(String content) {
- Assert.notNull("content is required");
+ Assert.notNull("Content must not be null");
this.content = content;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsMessageCodec.java
index 4c558432da..47fe0d070e 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsMessageCodec.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/frame/SockJsMessageCodec.java
@@ -19,7 +19,6 @@ package org.springframework.web.socket.sockjs.support.frame;
import java.io.IOException;
import java.io.InputStream;
-
/**
* Encode and decode messages to and from a SockJS message frame, essentially an array of
* JSON-encoded messages. For example:
@@ -33,13 +32,11 @@ import java.io.InputStream;
*/
public interface SockJsMessageCodec {
-
/**
* Encode the given messages as a SockJS message frame. Aside from applying standard
* JSON quoting to each message, there are some additional JSON Unicode escaping
* rules. See the "JSON Unicode Encoding" section of SockJS protocol (i.e. the
* protocol test suite).
- *
* @param messages the messages to encode
* @return the content for a SockJS message frame, never {@code null}
*/
@@ -47,7 +44,6 @@ public interface SockJsMessageCodec {
/**
* Decode the given SockJS message frame.
- *
* @param content the SockJS message frame
* @return an array of messages or {@code null}
* @throws IOException if the content could not be parsed
@@ -56,7 +52,6 @@ public interface SockJsMessageCodec {
/**
* Decode the given SockJS message frame.
- *
* @param content the SockJS message frame
* @return an array of messages or {@code null}
* @throws IOException if the content could not be parsed
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandler.java
index a7ecd15b3a..069c519955 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandler.java
@@ -31,7 +31,6 @@ import org.springframework.web.socket.sockjs.SockJsService;
*/
public interface TransportHandler {
-
/**
* @return the transport type supported by this handler
*/
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java
index 79de7ab895..3634f59976 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java
@@ -42,7 +42,6 @@ import com.fasterxml.jackson.databind.JsonMappingException;
public abstract class AbstractHttpReceivingTransportHandler
extends TransportHandlerSupport implements TransportHandler {
-
@Override
public final void handleRequest(ServerHttpRequest request, ServerHttpResponse response,
WebSocketHandler wsHandler, WebSocketSession wsSession) throws SockJsException {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsService.java
index c026df03bd..a5278b9c10 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsService.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsService.java
@@ -56,7 +56,6 @@ import org.springframework.web.socket.sockjs.transport.TransportType;
import org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession;
import org.springframework.web.socket.sockjs.transport.session.SockJsServiceConfig;
-
/**
* A default implementation of {@link SockJsService} adding support for transport handling
* and session management. See {@link AbstractSockJsService} base class for important
@@ -87,11 +86,10 @@ public class DefaultSockJsService extends AbstractSockJsService {
/**
* Create an instance with default {@link TransportHandler transport handler} types.
- *
* @param taskScheduler a task scheduler for heart-beat messages and removing
- * timed-out sessions; the provided TaskScheduler should be declared as a
- * Spring bean to ensure it is initialized at start up and shut down when the
- * application stops.
+ * timed-out sessions; the provided TaskScheduler should be declared as a
+ * Spring bean to ensure it is initialized at start up and shut down when the
+ * application stops.
*/
public DefaultSockJsService(TaskScheduler taskScheduler) {
this(taskScheduler, null);
@@ -100,15 +98,14 @@ public class DefaultSockJsService extends AbstractSockJsService {
/**
* Create an instance by overriding or replacing completely the default
* {@link TransportHandler transport handler} types.
- *
* @param taskScheduler a task scheduler for heart-beat messages and removing
- * timed-out sessions; the provided TaskScheduler should be declared as a
- * Spring bean to ensure it is initialized at start up and shut down when the
- * application stops.
+ * timed-out sessions; the provided TaskScheduler should be declared as a
+ * Spring bean to ensure it is initialized at start up and shut down when the
+ * application stops.
* @param transportHandlers the transport handlers to use (replaces the default ones);
- * can be {@code null} if you don't want to install the default ones.
+ * can be {@code null} if you don't want to install the default ones.
* @param transportHandlerOverrides zero or more overrides to the default transport
- * handler types.
+ * handler types.
*/
public DefaultSockJsService(TaskScheduler taskScheduler, Collection Performs cleanup and notifies the {@link WebSocketHandler}.
*/
@Override
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/SockJsServiceConfig.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/SockJsServiceConfig.java
index d99342753f..a0d44e9a2a 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/SockJsServiceConfig.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/SockJsServiceConfig.java
@@ -38,7 +38,6 @@ public interface SockJsServiceConfig {
* closed. After that client will open a new request. Setting this value to
* one effectively disables streaming and will make streaming transports to
* behave like polling transports.
- *
* The default value is 128K (i.e. 128 * 1024).
*/
int getStreamBytesLimit();
@@ -47,7 +46,6 @@ public interface SockJsServiceConfig {
* The amount of time in milliseconds when the server has not sent any
* messages and after which the server should send a heartbeat frame to the
* client in order to keep the connection from breaking.
- *
* The default value is 25,000 (25 seconds).
*/
long getHeartbeatTime();
@@ -67,12 +65,10 @@ public interface SockJsServiceConfig {
* The number of server-to-client messages that a session can cache while waiting for
* the next HTTP polling request from the client. All HTTP transports use this
* property since even streaming transports recycle HTTP requests periodically.
- *
- * The amount of time between HTTP requests should be relatively brief and will not
+ * The amount of time between HTTP requests should be relatively brief and will not
* exceed the allows disconnect delay (see
* {@link AbstractSockJsService#setDisconnectDelay(long)}, 5 seconds by default.
- *
- * The default size is 100.
+ * The default size is 100.
*/
int getHttpMessageCacheSize();
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/support/PerConnectionWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/support/PerConnectionWebSocketHandler.java
index 97bd27ed24..74e34e6bad 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/support/PerConnectionWebSocketHandler.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/support/PerConnectionWebSocketHandler.java
@@ -34,16 +34,14 @@ import org.springframework.web.socket.WebSocketSession;
* A {@link WebSocketHandler} that initializes and destroys a {@link WebSocketHandler}
* instance for each WebSocket connection and delegates all other methods to it.
*
- *
- * Essentially create an instance of this class once, providing the type of
+ * Essentially create an instance of this class once, providing the type of
* {@link WebSocketHandler} class to create for each connection, and then pass it to any
* API method that expects a {@link WebSocketHandler}.
*
- *
- * If initializing the target {@link WebSocketHandler} type requires a Spring BeanFctory,
- * then the {@link #setBeanFactory(BeanFactory)} property accordingly. Simply declaring
- * this class as a Spring bean will do that. Otherwise, {@link WebSocketHandler} instances
- * of the target type will be created using the default constructor.
+ * If initializing the target {@link WebSocketHandler} type requires a Spring
+ * BeanFctory, then the {@link #setBeanFactory(BeanFactory)} property accordingly. Simply
+ * declaring this class as a Spring bean will do that. Otherwise, {@link WebSocketHandler}
+ * instances of the target type will be created using the default constructor.
*
* @author Rossen Stoyanchev
* @since 4.0
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/support/SubProtocolCapable.java b/spring-websocket/src/main/java/org/springframework/web/socket/support/SubProtocolCapable.java
index 8fc69230f0..75449a8a25 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/support/SubProtocolCapable.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/support/SubProtocolCapable.java
@@ -7,7 +7,6 @@ import java.util.List;
*
* @author Rossen Stoyanchev
* @since 4.0
- *
* @see RFC-6455 section 1.9
*/
public interface SubProtocolCapable {
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketExtension.java b/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketExtension.java
index 805038661a..4802e2ee0b 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketExtension.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketExtension.java
@@ -48,8 +48,7 @@ import org.springframework.util.StringUtils;
*
* @author Brian Clozel
* @since 4.0
- * @see
- * WebSocket Protocol Extensions, RFC 6455 - Section 9
+ * @see WebSocket Protocol Extensions, RFC 6455 - Section 9
*/
public class WebSocketExtension {
@@ -60,7 +59,6 @@ public class WebSocketExtension {
/**
* Create a WebSocketExtension with the given name.
- *
* @param name the name of the extension
*/
public WebSocketExtension(String name) {
@@ -69,7 +67,6 @@ public class WebSocketExtension {
/**
* Create a WebSocketExtension with the given name and parameters.
- *
* @param name the name of the extension
* @param parameters the parameters
*/
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketHttpHeaders.java b/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketHttpHeaders.java
index ff7bbba910..18fe7c679d 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketHttpHeaders.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/support/WebSocketHttpHeaders.java
@@ -60,7 +60,6 @@ public class WebSocketHttpHeaders extends HttpHeaders {
/**
* Create an instance that wraps the given pre-existing HttpHeaders and also
* propagate all changes to it.
- *
* @param headers the HTTP headers to wrap
*/
public WebSocketHttpHeaders(HttpHeaders headers) {
setBeanFactory.
* This will happen automatically if this resolver is defined within an
* ApplicationContext thereby receiving the callback upon initialization.
- *
* @see #setBeanFactory
*/
public BeanFactoryMessageChannelDestinationResolver() {
@@ -51,7 +52,6 @@ public class BeanFactoryMessageChannelDestinationResolver implements Destination
* replaced by the {@link BeanFactory} that creates it (c.f. the
* {@link BeanFactoryAware} contract). So only use this constructor if you
* are instantiating this object explicitly rather than defining a bean.
- *
* @param beanFactory the bean factory to be used to lookup {@link MessageChannel}s.
*/
public BeanFactoryMessageChannelDestinationResolver(BeanFactory beanFactory) {
@@ -62,7 +62,7 @@ public class BeanFactoryMessageChannelDestinationResolver implements Destination
@Override
public MessageChannel resolveDestination(String name) {
- Assert.state(this.beanFactory != null, "BeanFactory is required");
+ Assert.state(this.beanFactory != null, "BeanFactory must not be null");
try {
return this.beanFactory.getBean(name, MessageChannel.class);
}
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageReceivingOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageReceivingOperations.java
index d109788342..1eca928832 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageReceivingOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageReceivingOperations.java
@@ -18,7 +18,6 @@ package org.springframework.messaging.core;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A {@link MessageReceivingOperations} that can resolve a String-based destinations.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageRequestReplyOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageRequestReplyOperations.java
index 48ad64e881..a562582b58 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageRequestReplyOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageRequestReplyOperations.java
@@ -20,7 +20,6 @@ import java.util.Map;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A {@link MessageRequestReplyOperations} that can resolve a String-based destinations.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageSendingOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageSendingOperations.java
index 1c1ccf5429..0f9e7b69ce 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageSendingOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolvingMessageSendingOperations.java
@@ -20,7 +20,6 @@ import java.util.Map;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A {@link MessageSendingOperations} that can resolve a String-based destinations.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/GenericMessagingTemplate.java b/spring-messaging/src/main/java/org/springframework/messaging/core/GenericMessagingTemplate.java
index 5a9786e9e0..efa019ef8d 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/GenericMessagingTemplate.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/GenericMessagingTemplate.java
@@ -31,7 +31,6 @@ import org.springframework.messaging.PollableChannel;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert;
-
/**
* A messaging template for sending to and/or receiving messages from a
* {@link MessageChannel}.
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageReceivingOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageReceivingOperations.java
index afede2f8e4..41a4d681a9 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageReceivingOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageReceivingOperations.java
@@ -18,7 +18,6 @@ package org.springframework.messaging.core;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A set of operations receiving messages from a destination.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java
index 88ee719cdb..4354193202 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java
@@ -20,7 +20,6 @@ import java.util.Map;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A set of operations for exchanging messages to and from a destination.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java
index 32b7ed5817..a5407d5f86 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java
@@ -20,7 +20,6 @@ import java.util.Map;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* A set of operations sending messages to a destination.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Header.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Header.java
index 31ef8cb613..0d4f1d2637 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Header.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Header.java
@@ -22,7 +22,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
/**
* Annotation which indicates that a method parameter should be bound to a message header.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Headers.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Headers.java
index 460ef8b70d..93eef2a1e0 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Headers.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Headers.java
@@ -22,7 +22,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
/**
* Annotation which indicates that a method parameter should be bound to the headers of a
* message. The annotated parameter must be assignable to {@link java.util.Map} with
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageExceptionHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageExceptionHandler.java
index 6fed9a259f..f7fdc4086d 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageExceptionHandler.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageExceptionHandler.java
@@ -23,12 +23,10 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
/**
* Annotation for handling exceptions from message-handling methods within specific
* handler methods.
*
- *
* @author Rossen Stoyanchev
* @since 4.0
*/
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageMapping.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageMapping.java
index 7b91921aa9..64800d1726 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageMapping.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageMapping.java
@@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.messaging.Message;
-
/**
* Annotation for mapping a {@link Message} onto message-handling methods by matching
* to the message destination. This annotation can also be used on the type-level in
@@ -32,8 +31,8 @@ import org.springframework.messaging.Message;
* annotations including method-level
* {@link org.springframework.messaging.simp.annotation.SubscribeMapping @SubscribeMapping}
* annotations.
- *
@@ -62,12 +61,12 @@ import org.springframework.messaging.Message;
* WebSocket session on which the message was received. Regular HTTP-based
* authentication (e.g. Spring Security based) can be used to secure the
* HTTP handshake that initiates WebSocket sessions.
- *
- *
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageHandlingException.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageHandlingException.java
index c2f07a91bd..8f41a79fc8 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageHandlingException.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageHandlingException.java
@@ -19,7 +19,6 @@ package org.springframework.messaging.handler.annotation.support;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
-
/**
* Thrown when the handling of a message results in an unrecoverable exception.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java
index 9ef044c0cb..48c4939565 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java
@@ -20,7 +20,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.method.HandlerMethodArgumentResolver;
-
/**
* A {@link HandlerMethodArgumentResolver} for {@link Message} parameters.
*
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java
index fa42fcf175..69527c806f 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java
@@ -25,13 +25,11 @@ import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
-
/**
* A resolver to extract and convert the payload of a message using a
* {@link MessageConverter}.
*
- *
headers)
throws MessagingException;
/**
* Send a message to a specific user.
- *
* @param user the user that should receive the message.
* @param destination the destination to send the message to.
* @param payload the payload to send
@@ -55,6 +59,14 @@ public interface SimpMessageSendingOperations extends MessageSendingOperations headers,
MessagePostProcessor postProcessor) throws MessagingException;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java
index b8a340de7e..7257d15544 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java
@@ -16,7 +16,6 @@
package org.springframework.messaging.simp;
-
/**
* A generic representation of different kinds of messages found in simple messaging
* protocols like STOMP.
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java
index d36fe79324..1185649857 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java
@@ -26,7 +26,6 @@ import org.springframework.messaging.core.MessagePostProcessor;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert;
-
/**
* A specialization of {@link AbstractMessageSendingTemplate} that adds String-based
* destinations as a message header.
@@ -44,8 +43,12 @@ public class SimpMessagingTemplate extends AbstractMessageSendingTemplate implements Listena
protected AbstractPromiseToListenableFutureAdapter(Promise promise) {
-
- Assert.notNull(promise, "promise is required");
+ Assert.notNull(promise, "Promise must not be null");
this.promise = promise;
this.promise.onSuccess(new Consumer() {
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/FixedIntervalReconnectStrategy.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/FixedIntervalReconnectStrategy.java
index 63e1193639..f36db3a86c 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/FixedIntervalReconnectStrategy.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/FixedIntervalReconnectStrategy.java
@@ -16,7 +16,6 @@
package org.springframework.messaging.support.tcp;
-
/**
* A simple strategy for making reconnect attempts at a fixed interval.
*
@@ -35,6 +34,7 @@ public class FixedIntervalReconnectStrategy implements ReconnectStrategy {
this.interval = interval;
}
+
@Override
public Long getTimeToNextAttempt(int attemptCount) {
return this.interval;
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/PassThroughPromiseToListenableFutureAdapter.java b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/PassThroughPromiseToListenableFutureAdapter.java
index 03d6f528fd..8f62b91ce8 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/PassThroughPromiseToListenableFutureAdapter.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/support/tcp/PassThroughPromiseToListenableFutureAdapter.java
@@ -18,7 +18,6 @@ package org.springframework.messaging.support.tcp;
import reactor.core.composable.Promise;
-
/**
* A Promise-to-ListenableFutureAdapter where the source and the target from the Promise and
* the ListenableFuture respectively are of the same type.
@@ -29,13 +28,14 @@ import reactor.core.composable.Promise;
class PassThroughPromiseToListenableFutureAdapter
* @RequestMapping("/people/{id}/addresses")
@@ -207,13 +196,10 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
*
* The above supports {@code @PathVariable} and {@code @RequestParam} method parameters.
* Any other arguments can be provided as {@literal null} and will be ignored.
- *
* UriComponentsBuilder builder = MvcUriComponentsBuilder.fromMethodCall(
* on(FooController.class).getFoo(1)).build();
*
- *
* @param controllerType the target controller
*/
public static
* FooController fooController = controller(FooController.class);
*
@@ -353,7 +334,6 @@ public class MvcUriComponentsBuilder extends UriComponentsBuilder {
* fooController.saveFoo(2, null);
* builder = MvcUriComponentsBuilder.fromMethodCall(fooController);
*
- *
* @param controllerType the target controller
*/
public static