From 307bf4bede299bdc95a99f68ae51fd076d5cdca9 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 6 Dec 2013 17:05:29 -0500 Subject: [PATCH] Add messaging.simp.user package --- .../messaging/simp/SimpMessagingTemplate.java | 2 +- .../messaging/simp/annotation/SendToUser.java | 2 +- .../messaging/simp/annotation/package-info.java | 3 +-- .../simp/broker/AbstractSubscriptionRegistry.java | 4 ++++ .../simp/broker/DefaultSubscriptionRegistry.java | 2 ++ .../config/AbstractMessageBrokerConfiguration.java | 10 +++++----- .../springframework/messaging/simp/package-info.java | 2 +- .../DefaultUserDestinationResolver.java | 2 +- .../{handler => user}/DefaultUserSessionRegistry.java | 2 +- .../UserDestinationMessageHandler.java | 2 +- .../{handler => user}/UserDestinationResolver.java | 2 +- .../simp/{handler => user}/UserSessionRegistry.java | 2 +- .../messaging/simp/user/package-info.java | 9 +++++++++ .../SimpAnnotationMethodMessageHandlerTests.java | 2 +- .../simp/config/MessageBrokerConfigurationTests.java | 4 ++-- .../DefaultUserDestinationResolverTests.java | 7 +++++-- .../DefaultUserSessionRegistryTests.java | 5 +++-- .../UserDestinationMessageHandlerTests.java | 8 ++++++-- .../config/MessageBrokerBeanDefinitionParser.java | 6 +++--- .../config/annotation/WebMvcStompEndpointRegistry.java | 2 +- .../web/socket/messaging/StompSubProtocolHandler.java | 4 ++-- .../config/MessageBrokerBeanDefinitionParserTests.java | 8 ++++---- .../annotation/WebMvcStompEndpointRegistryTests.java | 5 ++--- 23 files changed, 58 insertions(+), 37 deletions(-) rename spring-messaging/src/main/java/org/springframework/messaging/simp/{handler => user}/DefaultUserDestinationResolver.java (99%) rename spring-messaging/src/main/java/org/springframework/messaging/simp/{handler => user}/DefaultUserSessionRegistry.java (97%) rename spring-messaging/src/main/java/org/springframework/messaging/simp/{handler => user}/UserDestinationMessageHandler.java (99%) rename spring-messaging/src/main/java/org/springframework/messaging/simp/{handler => user}/UserDestinationResolver.java (97%) rename spring-messaging/src/main/java/org/springframework/messaging/simp/{handler => user}/UserSessionRegistry.java (94%) create mode 100644 spring-messaging/src/main/java/org/springframework/messaging/simp/user/package-info.java rename spring-messaging/src/test/java/org/springframework/messaging/simp/{handler => annotation/support}/SimpAnnotationMethodMessageHandlerTests.java (99%) rename spring-messaging/src/test/java/org/springframework/messaging/simp/{handler => user}/DefaultUserDestinationResolverTests.java (91%) rename spring-messaging/src/test/java/org/springframework/messaging/simp/{handler => user}/DefaultUserSessionRegistryTests.java (91%) rename spring-messaging/src/test/java/org/springframework/messaging/simp/{handler => user}/UserDestinationMessageHandlerTests.java (91%) 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 62b12bcee3..91594488fd 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 @@ -57,7 +57,7 @@ public class SimpMessagingTemplate extends AbstractMessageSendingTemplateThe default value is "/user/". - * @see org.springframework.messaging.simp.handler.UserDestinationMessageHandler + * @see org.springframework.messaging.simp.user.UserDestinationMessageHandler */ public void setUserDestinationPrefix(String prefix) { Assert.notNull(prefix, "UserDestinationPrefix must not be null"); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SendToUser.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SendToUser.java index 03b33b8037..d083baabf9 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SendToUser.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SendToUser.java @@ -36,7 +36,7 @@ import org.springframework.messaging.simp.SimpMessageHeaderAccessor; * @author Rossen Stoyanchev * @since 4.0 * @see org.springframework.messaging.handler.annotation.SendTo - * @see org.springframework.messaging.simp.handler.UserDestinationMessageHandler + * @see org.springframework.messaging.simp.user.UserDestinationMessageHandler */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/package-info.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/package-info.java index c8f5429f53..ed796bf1da 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/package-info.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/package-info.java @@ -1,5 +1,4 @@ /** - * Annotations and for handling messages from simple messaging protocols - * (like STOMP). + * Annotations and for handling messages from SImple Messaging Protocols such as STOMP. */ package org.springframework.messaging.simp.annotation; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java index a946f37cdc..34fc89799a 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java @@ -24,6 +24,10 @@ import org.springframework.messaging.simp.SimpMessageType; import org.springframework.util.MultiValueMap; /** + * Abstract base class for implementations of {@link SubscriptionRegistry} that + * looks up information in messages but delegates to abstract methods for the + * actual storage and retrieval. + * * @author Rossen Stoyanchev * @since 4.0 */ diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java index 9ec2cc998f..d97b3ea1b4 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java @@ -31,6 +31,8 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** + * A default, simple in-memory implementation of {@link SubscriptionRegistry}. + * * @author Rossen Stoyanchev * @since 4.0 */ diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java index 6a94298521..f76b0dd3c3 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java @@ -30,12 +30,12 @@ import org.springframework.messaging.converter.StringMessageConverter; import org.springframework.messaging.simp.SimpMessagingTemplate; import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler; import org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler; -import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver; -import org.springframework.messaging.simp.handler.DefaultUserSessionRegistry; +import org.springframework.messaging.simp.user.DefaultUserDestinationResolver; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationResolver; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.UserDestinationMessageHandler; +import org.springframework.messaging.simp.user.UserDestinationResolver; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.support.AbstractSubscribableChannel; import org.springframework.messaging.support.ExecutorSubscribableChannel; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java index 4073d52cb1..343b07c30e 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java @@ -1,4 +1,4 @@ /** - * Generic support for SImple Messaging Protocols such as STOMP. + * Generic support for SImple Messaging Protocols including protocols such as STOMP. */ package org.springframework.messaging.simp; 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/user/DefaultUserDestinationResolver.java similarity index 99% rename from spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java rename to spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java index ee76da4326..8d3bec59dc 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; 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/user/DefaultUserSessionRegistry.java similarity index 97% rename from spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java rename to spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserSessionRegistry.java index bd4ef6e62d..5fa7f12a50 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistry.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserSessionRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import org.springframework.util.Assert; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationMessageHandler.java similarity index 99% rename from spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandler.java rename to spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationMessageHandler.java index 5099d79410..9e201b3e4b 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationMessageHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import java.util.Set; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java similarity index 97% rename from spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationResolver.java rename to spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java index 71f999f861..66843251fb 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserDestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import org.springframework.messaging.Message; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserSessionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserSessionRegistry.java similarity index 94% rename from spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserSessionRegistry.java rename to spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserSessionRegistry.java index 950867bc40..4074d6b9f8 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/handler/UserSessionRegistry.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserSessionRegistry.java @@ -1,4 +1,4 @@ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import java.util.Set; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/package-info.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/package-info.java new file mode 100644 index 0000000000..f9d68a9898 --- /dev/null +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/package-info.java @@ -0,0 +1,9 @@ +/** + * Support for handling messages to "user" destinations (i.e. destinations that are + * unique to a user's sessions), primarily translating the destinations and then + * forwarding the updated message to the broker. + *

+ * Also included is {@link org.springframework.messaging.simp.user.UserSessionRegistry} + * for keeping track of connected user sessions. + */ +package org.springframework.messaging.simp.user; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpAnnotationMethodMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java similarity index 99% rename from spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpAnnotationMethodMessageHandlerTests.java rename to spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java index 0c6177c12e..5de8136835 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpAnnotationMethodMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.annotation.support; import java.util.LinkedHashMap; import java.util.Map; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java index d94c0e5b71..3495c28ac5 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java @@ -35,8 +35,8 @@ import org.springframework.messaging.simp.SimpMessageType; import org.springframework.messaging.simp.annotation.SubscribeMapping; import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler; import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationMessageHandler; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.UserDestinationMessageHandler; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaderAccessor; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolverTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java similarity index 91% rename from spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolverTests.java rename to spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java index 4a62301f12..ed0f04735c 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserDestinationResolverTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import org.junit.Before; import org.junit.Test; @@ -22,6 +22,9 @@ import org.springframework.messaging.Message; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.messaging.simp.TestPrincipal; +import org.springframework.messaging.simp.user.DefaultUserDestinationResolver; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.support.MessageBuilder; import java.util.Set; @@ -29,7 +32,7 @@ import java.util.Set; import static org.junit.Assert.assertEquals; /** - * Unit tests for {@link DefaultUserDestinationResolver}. + * Unit tests for {@link org.springframework.messaging.simp.user.DefaultUserDestinationResolver}. */ public class DefaultUserDestinationResolverTests { diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistryTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserSessionRegistryTests.java similarity index 91% rename from spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistryTests.java rename to spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserSessionRegistryTests.java index 879f97abb6..eed67b4c92 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultUserSessionRegistryTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserSessionRegistryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import java.util.Arrays; import java.util.Collections; @@ -22,11 +22,12 @@ import java.util.LinkedHashSet; import java.util.List; import org.junit.Test; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; import static org.junit.Assert.*; /** - * Test fixture for {@link DefaultUserSessionRegistry} + * Test fixture for {@link org.springframework.messaging.simp.user.DefaultUserSessionRegistry} * * @author Rossen Stoyanchev * @since 4.0 diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java similarity index 91% rename from spring-messaging/src/test/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandlerTests.java rename to spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java index 813743d403..0405a7918c 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/handler/UserDestinationMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp.handler; +package org.springframework.messaging.simp.user; import org.junit.Before; import org.junit.Test; @@ -28,13 +28,17 @@ import org.springframework.messaging.SubscribableChannel; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.messaging.simp.TestPrincipal; +import org.springframework.messaging.simp.user.DefaultUserDestinationResolver; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; +import org.springframework.messaging.simp.user.UserDestinationMessageHandler; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.support.MessageBuilder; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; /** - * Unit tests for {@link UserDestinationMessageHandler}. + * Unit tests for {@link org.springframework.messaging.simp.user.UserDestinationMessageHandler}. */ public class UserDestinationMessageHandlerTests { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java index 76f6929e79..e5cf43fe07 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java @@ -39,10 +39,10 @@ import org.springframework.messaging.converter.MappingJackson2MessageConverter; import org.springframework.messaging.converter.StringMessageConverter; import org.springframework.messaging.simp.SimpMessagingTemplate; import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler; -import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver; -import org.springframework.messaging.simp.handler.DefaultUserSessionRegistry; +import org.springframework.messaging.simp.user.DefaultUserDestinationResolver; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationMessageHandler; +import org.springframework.messaging.simp.user.UserDestinationMessageHandler; import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler; import org.springframework.messaging.support.ExecutorSubscribableChannel; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java index 289966cd89..8703563164 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java @@ -21,7 +21,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.scheduling.TaskScheduler; import org.springframework.util.Assert; import org.springframework.util.MultiValueMap; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java index 0f6b388ca6..0075f6b357 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java @@ -29,7 +29,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.simp.stomp.*; import org.springframework.messaging.support.MessageBuilder; import org.springframework.util.Assert; @@ -66,7 +66,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler { /** * Provide a registry with which to register active user session ids. - * @see org.springframework.messaging.simp.handler.UserDestinationMessageHandler + * @see org.springframework.messaging.simp.user.UserDestinationMessageHandler */ public void setUserSessionRegistry(UserSessionRegistry registry) { this.userSessionRegistry = registry; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java index 517e1e271b..f89cc94da3 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java @@ -31,11 +31,11 @@ import org.springframework.messaging.converter.CompositeMessageConverter; import org.springframework.messaging.converter.MessageConverter; import org.springframework.messaging.simp.SimpMessagingTemplate; import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler; -import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver; +import org.springframework.messaging.simp.user.DefaultUserDestinationResolver; import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationMessageHandler; -import org.springframework.messaging.simp.handler.UserDestinationResolver; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.UserDestinationMessageHandler; +import org.springframework.messaging.simp.user.UserDestinationResolver; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler; import org.springframework.messaging.support.AbstractSubscribableChannel; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java index 33e16cea88..8a519422a7 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java @@ -24,11 +24,10 @@ import org.mockito.Mockito; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.SubscribableChannel; -import org.springframework.messaging.simp.handler.DefaultUserSessionRegistry; -import org.springframework.messaging.simp.handler.UserSessionRegistry; +import org.springframework.messaging.simp.user.DefaultUserSessionRegistry; +import org.springframework.messaging.simp.user.UserSessionRegistry; import org.springframework.scheduling.TaskScheduler; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; -import org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry; import org.springframework.web.socket.messaging.StompSubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;