Merged web.socket.messaging.config into web.socket.config and introduced web.socket.config.annotation
This commit is contained in:
parent
ab2949f2b7
commit
e62cd84ca2
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
@ -103,8 +103,7 @@ public abstract class AbstractWebSocketHandlerRegistration<M> implements WebSock
|
|||
return this.sockJsServiceRegistration;
|
||||
}
|
||||
|
||||
final M getMappings() {
|
||||
|
||||
public final M getMappings() {
|
||||
M mappings = createMappings();
|
||||
|
||||
if (this.sockJsServiceRegistration != null) {
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -39,10 +39,9 @@ public class DelegatingWebSocketConfiguration extends WebSocketConfigurationSupp
|
|||
|
||||
@Autowired(required = false)
|
||||
public void setConfigurers(List<WebSocketConfigurer> configurers) {
|
||||
if (CollectionUtils.isEmpty(configurers)) {
|
||||
return;
|
||||
if (!CollectionUtils.isEmpty(configurers)) {
|
||||
this.configurers.addAll(configurers);
|
||||
}
|
||||
this.configurers.addAll(configurers);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -44,10 +44,9 @@ public class DelegatingWebSocketMessageBrokerConfiguration extends WebSocketMess
|
|||
|
||||
@Autowired(required=false)
|
||||
public void setConfigurers(List<WebSocketMessageBrokerConfigurer> configurers) {
|
||||
if (CollectionUtils.isEmpty(configurers)) {
|
||||
return;
|
||||
if (!CollectionUtils.isEmpty(configurers)) {
|
||||
this.configurers.addAll(configurers);
|
||||
}
|
||||
this.configurers.addAll(configurers);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package org.springframework.web.socket.config;
|
||||
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
@ -40,7 +40,6 @@ import org.springframework.web.socket.sockjs.SockJsService;
|
|||
public class ServletWebSocketHandlerRegistration
|
||||
extends AbstractWebSocketHandlerRegistration<MultiValueMap<HttpRequestHandler, String>> {
|
||||
|
||||
|
||||
public ServletWebSocketHandlerRegistration(TaskScheduler sockJsTaskScheduler) {
|
||||
super(sockJsTaskScheduler);
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
|
@ -51,16 +51,17 @@ public class ServletWebSocketHandlerRegistry implements WebSocketHandlerRegistry
|
|||
|
||||
@Override
|
||||
public WebSocketHandlerRegistration addHandler(WebSocketHandler webSocketHandler, String... paths) {
|
||||
ServletWebSocketHandlerRegistration r = new ServletWebSocketHandlerRegistration(this.sockJsTaskScheduler);
|
||||
r.addHandler(webSocketHandler, paths);
|
||||
this.registrations.add(r);
|
||||
return r;
|
||||
ServletWebSocketHandlerRegistration registration =
|
||||
new ServletWebSocketHandlerRegistration(this.sockJsTaskScheduler);
|
||||
registration.addHandler(webSocketHandler, paths);
|
||||
this.registrations.add(registration);
|
||||
return registration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@link HandlerMapping} with mapped {@link HttpRequestHandler}s.
|
||||
* Return a {@link HandlerMapping} with mapped {@link HttpRequestHandler}s.
|
||||
*/
|
||||
AbstractHandlerMapping getHandlerMapping() {
|
||||
public AbstractHandlerMapping getHandlerMapping() {
|
||||
Map<String, Object> urlMap = new LinkedHashMap<String, Object>();
|
||||
for (ServletWebSocketHandlerRegistration registration : this.registrations) {
|
||||
MultiValueMap<HttpRequestHandler, String> mappings = registration.getMappings();
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -29,7 +29,7 @@ import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsServ
|
|||
|
||||
/**
|
||||
* A helper class for configuring SockJS fallback options, typically used indirectly, in
|
||||
* conjunction with {@link EnableWebSocket @EnableWebSocket} and
|
||||
* conjunction with {@link org.springframework.web.socket.config.annotation.EnableWebSocket @EnableWebSocket} and
|
||||
* {@link WebSocketConfigurer}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
/**
|
||||
* A contract for registering STOMP over WebSocket endpoints.
|
||||
|
|
@ -14,10 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
import org.springframework.web.socket.config.SockJsServiceRegistration;
|
||||
|
||||
/**
|
||||
* A contract for configuring a STOMP over WebSocket endpoint.
|
||||
|
|
@ -14,12 +14,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.messaging.simp.handler.UserSessionRegistry;
|
||||
import org.springframework.web.socket.messaging.StompSubProtocolHandler;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
|
@ -27,6 +29,7 @@ import org.springframework.web.HttpRequestHandler;
|
|||
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
|
||||
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.messaging.StompSubProtocolHandler;
|
||||
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
|
||||
import org.springframework.web.socket.support.WebSocketHandlerDecorator;
|
||||
|
||||
|
|
@ -98,9 +101,9 @@ public class WebMvcStompEndpointRegistry implements StompEndpointRegistry {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a handler mapping with the mapped ViewControllers; or {@code null} in case of no registrations.
|
||||
* Return a handler mapping with the mapped ViewControllers; or {@code null} in case of no registrations.
|
||||
*/
|
||||
protected AbstractHandlerMapping getHandlerMapping() {
|
||||
public AbstractHandlerMapping getHandlerMapping() {
|
||||
Map<String, Object> urlMap = new LinkedHashMap<String, Object>();
|
||||
for (WebMvcStompWebSocketEndpointRegistration registration : this.registrations) {
|
||||
MultiValueMap<HttpRequestHandler, String> mappings = registration.getMappings();
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.util.Assert;
|
||||
|
|
@ -23,7 +23,6 @@ import org.springframework.util.MultiValueMap;
|
|||
import org.springframework.web.HttpRequestHandler;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
import org.springframework.web.socket.config.SockJsServiceRegistration;
|
||||
import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler;
|
||||
import org.springframework.web.socket.sockjs.SockJsHttpRequestHandler;
|
||||
import org.springframework.web.socket.sockjs.SockJsService;
|
||||
|
|
@ -82,7 +81,7 @@ public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketE
|
|||
return this.registration;
|
||||
}
|
||||
|
||||
protected final MultiValueMap<HttpRequestHandler, String> getMappings() {
|
||||
public final MultiValueMap<HttpRequestHandler, String> getMappings() {
|
||||
MultiValueMap<HttpRequestHandler, String> mappings = new LinkedMultiValueMap<HttpRequestHandler, String>();
|
||||
if (this.registration != null) {
|
||||
SockJsService sockJsService = this.registration.getSockJsService();
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
|
|
@ -14,13 +14,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
|
||||
/**
|
||||
* Defines callback methods to configure the WebSocket request handling
|
||||
* via {@link EnableWebSocket @EnableWebSocket}.
|
||||
* via {@link org.springframework.web.socket.config.annotation.EnableWebSocket @EnableWebSocket}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
|
||||
|
|
@ -14,14 +14,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.config.SockJsServiceRegistration;
|
||||
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
|
||||
|
||||
/**
|
||||
|
|
@ -37,16 +36,13 @@ import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
|
|||
*/
|
||||
public abstract class WebSocketMessageBrokerConfigurationSupport extends AbstractMessageBrokerConfiguration {
|
||||
|
||||
|
||||
protected WebSocketMessageBrokerConfigurationSupport() {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public HandlerMapping stompWebSocketHandlerMapping() {
|
||||
|
||||
WebMvcStompEndpointRegistry registry = new WebMvcStompEndpointRegistry(
|
||||
subProtocolWebSocketHandler(), userSessionRegistry(), messageBrokerSockJsTaskScheduler());
|
||||
|
||||
registerStompEndpoints(registry);
|
||||
return registry.getHandlerMapping();
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
|
||||
import org.springframework.messaging.simp.config.ChannelRegistration;
|
||||
|
|
@ -24,7 +24,7 @@ import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
|||
* Defines methods for configuring message handling with simple messaging
|
||||
* protocols (e.g. STOMP) from WebSocket clients. Typically used to customize
|
||||
* the configuration provided via
|
||||
* {@link EnableWebSocketMessageBroker @EnableWebSocketMessageBroker}.
|
||||
* {@link org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker @EnableWebSocketMessageBroker}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for annotation-based WebSocket setup in configuration classes.
|
||||
*/
|
||||
package org.springframework.web.socket.config.annotation;
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* WebSocket integration for Spring's messaging module.
|
||||
*/
|
||||
package org.springframework.web.socket.messaging;
|
||||
|
||||
|
|
@ -31,9 +31,9 @@ import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
|
|||
import org.springframework.web.socket.client.endpoint.StandardWebSocketClient;
|
||||
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
|
||||
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
|
||||
import org.springframework.web.socket.config.EnableWebSocket;
|
||||
import org.springframework.web.socket.config.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.config.WebSocketHandlerRegistry;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
||||
import org.springframework.web.socket.support.WebSocketHttpHeaders;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import org.mockito.Mockito;
|
|||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.adapter.TextWebSocketHandlerAdapter;
|
||||
import org.springframework.web.socket.config.annotation.AbstractWebSocketHandlerRegistration;
|
||||
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
import org.springframework.web.socket.server.HandshakeInterceptor;
|
||||
|
|
@ -38,7 +39,7 @@ import org.springframework.web.socket.sockjs.transport.handler.WebSocketTranspor
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Test fixture for {@link AbstractWebSocketHandlerRegistration}.
|
||||
* Test fixture for {@link org.springframework.web.socket.config.annotation.AbstractWebSocketHandlerRegistration}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
|
@ -23,10 +23,12 @@ import java.util.Map;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.messaging.support.channel.ExecutorSubscribableChannel;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.HttpRequestHandler;
|
||||
import org.springframework.web.socket.config.annotation.WebMvcStompWebSocketEndpointRegistration;
|
||||
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
|
||||
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
|
||||
import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler;
|
||||
|
|
@ -38,7 +40,7 @@ import org.springframework.web.socket.sockjs.transport.handler.WebSocketTranspor
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Test fixture for {@link WebMvcStompWebSocketEndpointRegistration}.
|
||||
* Test fixture for {@link org.springframework.web.socket.config.annotation.WebMvcStompWebSocketEndpointRegistration}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
|
|
@ -14,28 +14,29 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
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.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;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Test fixture for {@link WebMvcStompEndpointRegistry}.
|
||||
* Test fixture for {@link org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
|
|
@ -34,6 +34,9 @@ import org.springframework.web.socket.WebSocketSession;
|
|||
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
|
||||
import org.springframework.web.socket.client.endpoint.StandardWebSocketClient;
|
||||
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,15 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.socket.messaging.config;
|
||||
package org.springframework.web.socket.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
@ -31,24 +36,23 @@ import org.springframework.messaging.simp.config.ChannelRegistration;
|
|||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||
import org.springframework.messaging.simp.stomp.StompCommand;
|
||||
import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
|
||||
import org.springframework.web.socket.messaging.StompTextMessageBuilder;
|
||||
import org.springframework.messaging.support.channel.AbstractSubscribableChannel;
|
||||
import org.springframework.messaging.support.channel.ExecutorSubscribableChannel;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
||||
import org.springframework.web.socket.TextMessage;
|
||||
import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration;
|
||||
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
||||
import org.springframework.web.socket.messaging.StompTextMessageBuilder;
|
||||
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
|
||||
import org.springframework.web.socket.support.TestWebSocketSession;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Test fixture for {@link WebSocketMessageBrokerConfigurationSupport}.
|
||||
* Test fixture for {@link org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
|
|
@ -50,9 +50,9 @@ import org.springframework.web.socket.WebSocketSession;
|
|||
import org.springframework.web.socket.adapter.TextWebSocketHandlerAdapter;
|
||||
import org.springframework.web.socket.client.endpoint.StandardWebSocketClient;
|
||||
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
|
||||
import org.springframework.web.socket.messaging.config.DelegatingWebSocketMessageBrokerConfiguration;
|
||||
import org.springframework.web.socket.messaging.config.StompEndpointRegistry;
|
||||
import org.springframework.web.socket.messaging.config.WebSocketMessageBrokerConfigurer;
|
||||
import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration;
|
||||
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
||||
import org.springframework.web.socket.server.HandshakeHandler;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
|
|
|||
Loading…
Reference in New Issue