Consistent ".jetty" and ".standard" subpackages; consolidated GlassFishRequestUpgradeStrategy implementation; renamed Text/BinaryWebSocketHandler and moved them to web.socket.support

This commit is contained in:
Juergen Hoeller
2013-12-03 01:30:22 +01:00
parent 7713a55f6b
commit 1dff45c38a
85 changed files with 544 additions and 413 deletions

View File

@@ -31,8 +31,8 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationCon
import org.springframework.web.socket.client.WebSocketClient;
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
import org.springframework.web.socket.server.RequestUpgradeStrategy;
import org.springframework.web.socket.server.support.JettyRequestUpgradeStrategy;
import org.springframework.web.socket.server.support.TomcatRequestUpgradeStrategy;
import org.springframework.web.socket.server.jetty.JettyRequestUpgradeStrategy;
import org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy;
/**
* Base class for WebSocket integration tests.

View File

@@ -26,15 +26,14 @@ import org.junit.runners.Parameterized;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.adapter.TextWebSocketHandlerAdapter;
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
import org.springframework.web.socket.client.endpoint.StandardWebSocketClient;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import org.springframework.web.socket.handler.AbstractWebSocketHandler;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
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.*;
@@ -67,7 +66,7 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTest
headers.setSecWebSocketProtocol("foo");
WebSocketSession session = this.webSocketClient.doHandshake(
new WebSocketHandlerAdapter(), headers, new URI(getWsBaseUrl() + "/ws")).get();
new AbstractWebSocketHandler() {}, headers, new URI(getWsBaseUrl() + "/ws")).get();
assertEquals("foo", session.getAcceptedProtocol());
}
@@ -92,7 +91,7 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTest
}
}
private static class TestServerWebSocketHandler extends TextWebSocketHandlerAdapter {
private static class TestServerWebSocketHandler extends TextWebSocketHandler {
}
}

View File

@@ -39,12 +39,13 @@ import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.socket.ContextLoaderTestUtils;
import org.springframework.web.socket.adapter.standard.ConvertingEncoderDecoderSupport;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
/**
* Test for {@link ConvertingEncoderDecoderSupport}.
* Test for {@link org.springframework.web.socket.adapter.standard.ConvertingEncoderDecoderSupport}.
*
* @author Phillip Webb
*/

View File

@@ -21,11 +21,13 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter;
import org.springframework.web.socket.adapter.jetty.JettyWebSocketSession;
import static org.mockito.Mockito.*;
/**
* Test fixture for {@link JettyWebSocketHandlerAdapter}.
* Test fixture for {@link org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter}.
*
* @author Rossen Stoyanchev
*/

View File

@@ -25,13 +25,15 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter;
import org.springframework.web.socket.adapter.standard.StandardWebSocketSession;
import static org.junit.Assert.*;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
/**
* Test fixture for {@link StandardWebSocketHandlerAdapter}.
* Test fixture for {@link org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter}.
*
* @author Rossen Stoyanchev
*/

View File

@@ -28,10 +28,10 @@ import org.springframework.util.concurrent.ListenableFuture;
import org.springframework.util.concurrent.ListenableFutureTask;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
import org.springframework.web.socket.support.LoggingWebSocketHandlerDecorator;
import org.springframework.web.socket.support.WebSocketHandlerDecorator;
import org.springframework.web.socket.support.WebSocketHttpHeaders;
import org.springframework.web.socket.handler.AbstractWebSocketHandler;
import org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator;
import org.springframework.web.socket.handler.WebSocketHandlerDecorator;
import org.springframework.web.socket.WebSocketHttpHeaders;
import org.springframework.web.util.UriComponentsBuilder;
import static org.junit.Assert.*;
@@ -45,11 +45,11 @@ public class WebSocketConnectionManagerTests {
@Test
public void openConnection() throws Exception {
List<String> subprotocols = Arrays.asList("abc");
TestLifecycleWebSocketClient client = new TestLifecycleWebSocketClient(false);
WebSocketHandler handler = new WebSocketHandlerAdapter();
WebSocketHandler handler = new AbstractWebSocketHandler() {
};
WebSocketConnectionManager manager = new WebSocketConnectionManager(client, handler , "/path/{id}", "123");
manager.setSubProtocols(subprotocols);
@@ -69,9 +69,9 @@ public class WebSocketConnectionManagerTests {
@Test
public void syncClientLifecycle() throws Exception {
TestLifecycleWebSocketClient client = new TestLifecycleWebSocketClient(false);
WebSocketHandler handler = new WebSocketHandlerAdapter();
WebSocketHandler handler = new AbstractWebSocketHandler() {
};
WebSocketConnectionManager manager = new WebSocketConnectionManager(client, handler , "/a");
manager.startInternal();
@@ -85,7 +85,8 @@ public class WebSocketConnectionManagerTests {
public void dontSyncClientLifecycle() throws Exception {
TestLifecycleWebSocketClient client = new TestLifecycleWebSocketClient(true);
WebSocketHandler handler = new WebSocketHandlerAdapter();
WebSocketHandler handler = new AbstractWebSocketHandler() {
};
WebSocketConnectionManager manager = new WebSocketConnectionManager(client, handler , "/a");
manager.startInternal();

View File

@@ -32,10 +32,10 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.SocketUtils;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.adapter.JettyWebSocketHandlerAdapter;
import org.springframework.web.socket.adapter.JettyWebSocketSession;
import org.springframework.web.socket.adapter.TextWebSocketHandlerAdapter;
import org.springframework.web.socket.support.WebSocketHttpHeaders;
import org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter;
import org.springframework.web.socket.adapter.jetty.JettyWebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import org.springframework.web.socket.WebSocketHttpHeaders;
import static org.junit.Assert.*;
@@ -59,7 +59,7 @@ public class JettyWebSocketClientTests {
int port = SocketUtils.findAvailableTcpPort();
this.server = new TestJettyWebSocketServer(port, new TextWebSocketHandlerAdapter());
this.server = new TestJettyWebSocketServer(port, new TextWebSocketHandler());
this.server.start();
this.client = new JettyWebSocketClient();
@@ -82,7 +82,7 @@ public class JettyWebSocketClientTests {
WebSocketHttpHeaders headers = new WebSocketHttpHeaders();
headers.setSecWebSocketProtocol(Arrays.asList("echo"));
this.wsSession = this.client.doHandshake(new TextWebSocketHandlerAdapter(), headers, new URI(this.wsUrl)).get();
this.wsSession = this.client.doHandshake(new TextWebSocketHandler(), headers, new URI(this.wsUrl)).get();
assertEquals(this.wsUrl, this.wsSession.getUri().toString());
assertEquals("echo", this.wsSession.getAcceptedProtocol());

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.client.endpoint;
package org.springframework.web.socket.client.standard;
import java.net.URI;
import java.util.Arrays;
@@ -22,7 +22,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.websocket.ClientEndpointConfig;
import javax.websocket.Endpoint;
import javax.websocket.WebSocketContainer;
@@ -30,10 +29,11 @@ import javax.websocket.WebSocketContainer;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
import org.springframework.web.socket.support.WebSocketHttpHeaders;
import org.springframework.web.socket.handler.AbstractWebSocketHandler;
import org.springframework.web.socket.WebSocketHttpHeaders;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
@@ -57,7 +57,8 @@ public class StandardWebSocketClientTests {
@Before
public void setup() {
this.headers = new WebSocketHttpHeaders();
this.wsHandler = new WebSocketHandlerAdapter();
this.wsHandler = new AbstractWebSocketHandler() {
};
this.wsContainer = mock(WebSocketContainer.class);
this.wsClient = new StandardWebSocketClient(this.wsContainer);
}

View File

@@ -39,7 +39,7 @@ import org.springframework.web.socket.messaging.StompSubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler;
import org.springframework.web.socket.sockjs.SockJsHttpRequestHandler;
import org.springframework.web.socket.support.WebSocketHandlerDecorator;
import org.springframework.web.socket.handler.WebSocketHandlerDecorator;
import java.util.Arrays;
import java.util.List;

View File

@@ -25,8 +25,7 @@ import org.junit.Test;
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.handler.TextWebSocketHandler;
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
import org.springframework.web.socket.server.HandshakeHandler;
import org.springframework.web.socket.server.HandshakeInterceptor;
@@ -59,7 +58,7 @@ public class AbstractWebSocketHandlerRegistrationTests {
@Test
public void minimal() {
WebSocketHandler wsHandler = new TextWebSocketHandlerAdapter();
WebSocketHandler wsHandler = new TextWebSocketHandler();
this.registration.addHandler(wsHandler, "/foo", "/bar");
List<Mapping> mappings = this.registration.getMappings();
@@ -77,7 +76,7 @@ public class AbstractWebSocketHandlerRegistrationTests {
@Test
public void interceptors() {
WebSocketHandler wsHandler = new TextWebSocketHandlerAdapter();
WebSocketHandler wsHandler = new TextWebSocketHandler();
HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor();
this.registration.addHandler(wsHandler, "/foo").addInterceptors(interceptor);
@@ -94,7 +93,7 @@ public class AbstractWebSocketHandlerRegistrationTests {
@Test
public void interceptorsPassedToSockJsRegistration() {
WebSocketHandler wsHandler = new TextWebSocketHandlerAdapter();
WebSocketHandler wsHandler = new TextWebSocketHandler();
HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor();
this.registration.addHandler(wsHandler, "/foo").addInterceptors(interceptor).withSockJS();
@@ -112,7 +111,7 @@ public class AbstractWebSocketHandlerRegistrationTests {
@Test
public void handshakeHandler() {
WebSocketHandler wsHandler = new TextWebSocketHandlerAdapter();
WebSocketHandler wsHandler = new TextWebSocketHandler();
HandshakeHandler handshakeHandler = new DefaultHandshakeHandler();
this.registration.addHandler(wsHandler, "/foo").setHandshakeHandler(handshakeHandler);
@@ -129,7 +128,7 @@ public class AbstractWebSocketHandlerRegistrationTests {
@Test
public void handshakeHandlerPassedToSockJsRegistration() {
WebSocketHandler wsHandler = new TextWebSocketHandlerAdapter();
WebSocketHandler wsHandler = new TextWebSocketHandler();
HandshakeHandler handshakeHandler = new DefaultHandshakeHandler();
this.registration.addHandler(wsHandler, "/foo").setHandshakeHandler(handshakeHandler).withSockJS();

View File

@@ -31,12 +31,9 @@ import org.springframework.web.socket.AbstractWebSocketIntegrationTests;
import org.springframework.web.socket.JettyWebSocketTestServer;
import org.springframework.web.socket.TomcatWebSocketTestServer;
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.handler.AbstractWebSocketHandler;
import org.springframework.web.socket.client.standard.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;
@@ -68,7 +65,7 @@ public class WebSocketConfigurationTests extends AbstractWebSocketIntegrationTes
public void registerWebSocketHandler() throws Exception {
WebSocketSession session = this.webSocketClient.doHandshake(
new WebSocketHandlerAdapter(), getWsBaseUrl() + "/ws").get();
new AbstractWebSocketHandler() {}, getWsBaseUrl() + "/ws").get();
TestWebSocketHandler serverHandler = this.wac.getBean(TestWebSocketHandler.class);
assertTrue(serverHandler.connectLatch.await(2, TimeUnit.SECONDS));
@@ -80,7 +77,7 @@ public class WebSocketConfigurationTests extends AbstractWebSocketIntegrationTes
public void registerWebSocketHandlerWithSockJS() throws Exception {
WebSocketSession session = this.webSocketClient.doHandshake(
new WebSocketHandlerAdapter(), getWsBaseUrl() + "/sockjs/websocket").get();
new AbstractWebSocketHandler() {}, getWsBaseUrl() + "/sockjs/websocket").get();
TestWebSocketHandler serverHandler = this.wac.getBean(TestWebSocketHandler.class);
assertTrue(serverHandler.connectLatch.await(2, TimeUnit.SECONDS));
@@ -113,7 +110,7 @@ public class WebSocketConfigurationTests extends AbstractWebSocketIntegrationTes
}
}
private static class TestWebSocketHandler extends WebSocketHandlerAdapter {
private static class TestWebSocketHandler extends AbstractWebSocketHandler {
private CountDownLatch connectLatch = new CountDownLatch(1);

View File

@@ -42,12 +42,9 @@ 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 org.springframework.web.socket.handler.TestWebSocketSession;
import static org.junit.Assert.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import org.junit.Test;
import org.springframework.beans.BeanInstantiationException;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import org.junit.Before;
import org.junit.Test;

View File

@@ -14,14 +14,13 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import org.junit.Test;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
import static org.junit.Assert.*;
@@ -57,7 +56,7 @@ public class PerConnectionWebSocketHandlerTests {
}
public static class EchoHandler extends WebSocketHandlerAdapter implements DisposableBean {
public static class EchoHandler extends AbstractWebSocketHandler implements DisposableBean {
private static int initCount;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import java.security.Principal;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import java.io.IOException;
import java.net.InetSocketAddress;

View File

@@ -14,10 +14,9 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import org.junit.Test;
import org.springframework.web.socket.adapter.WebSocketHandlerAdapter;
import static org.junit.Assert.*;
@@ -28,10 +27,10 @@ import static org.junit.Assert.*;
*/
public class WebSocketHandlerDecoratorTests {
@Test
public void getLastHandler() {
WebSocketHandlerAdapter h1 = new WebSocketHandlerAdapter();
AbstractWebSocketHandler h1 = new AbstractWebSocketHandler() {
};
WebSocketHandlerDecorator h2 = new WebSocketHandlerDecorator(h1);
WebSocketHandlerDecorator h3 = new WebSocketHandlerDecorator(h2);

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.support;
package org.springframework.web.socket.handler;
import java.util.ArrayList;
import java.util.List;
@@ -23,6 +23,7 @@ import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.springframework.web.socket.WebSocketExtension;
import org.springframework.web.socket.WebSocketHttpHeaders;
import static org.junit.Assert.*;

View File

@@ -47,8 +47,8 @@ import org.springframework.web.socket.JettyWebSocketTestServer;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.TomcatWebSocketTestServer;
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.handler.TextWebSocketHandler;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
@@ -170,7 +170,7 @@ public class SimpAnnotationMethodIntegrationTests extends AbstractWebSocketInteg
}
private static class TestClientWebSocketHandler extends TextWebSocketHandlerAdapter {
private static class TestClientWebSocketHandler extends TextWebSocketHandler {
private final TextMessage[] messagesToSend;

View File

@@ -34,7 +34,7 @@ import org.springframework.messaging.simp.stomp.StompDecoder;
import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.support.TestWebSocketSession;
import org.springframework.web.socket.handler.TestWebSocketSession;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

View File

@@ -24,7 +24,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.web.socket.support.TestWebSocketSession;
import org.springframework.web.socket.handler.TestWebSocketSession;
import static org.mockito.Mockito.*;

View File

@@ -27,11 +27,11 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.web.socket.AbstractHttpRequestTests;
import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
import org.springframework.web.socket.support.SubProtocolCapable;
import org.springframework.web.socket.SubProtocolCapable;
import org.springframework.web.socket.WebSocketExtension;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.adapter.TextWebSocketHandlerAdapter;
import org.springframework.web.socket.support.WebSocketHttpHeaders;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import org.springframework.web.socket.WebSocketHttpHeaders;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.*;
@@ -72,7 +72,7 @@ public class DefaultHandshakeHandlerTests extends AbstractHttpRequestTests {
headers.setSecWebSocketKey("82/ZS2YHjEnUN97HLL8tbw==");
headers.setSecWebSocketProtocol("STOMP");
WebSocketHandler handler = new TextWebSocketHandlerAdapter();
WebSocketHandler handler = new TextWebSocketHandler();
Map<String, Object> attributes = Collections.<String, Object>emptyMap();
this.handshakeHandler.doHandshake(this.request, this.response, handler, attributes);
@@ -125,7 +125,7 @@ public class DefaultHandshakeHandlerTests extends AbstractHttpRequestTests {
}
private static class SubProtocolCapableHandler extends TextWebSocketHandlerAdapter implements SubProtocolCapable {
private static class SubProtocolCapableHandler extends TextWebSocketHandler implements SubProtocolCapable {
private final List<String> subProtocols;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.server.endpoint;
package org.springframework.web.socket.server.standard;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
@@ -28,13 +28,11 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mock.web.test.MockServletContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.socket.server.support.ServerEndpointExporter;
import org.springframework.web.socket.server.support.ServerEndpointRegistration;
import static org.mockito.Mockito.*;
/**
* Test fixture for {@link org.springframework.web.socket.server.support.ServerEndpointExporter}.
* Test fixture for {@link ServerEndpointExporter}.
*
* @author Rossen Stoyanchev
*/

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.server.endpoint;
package org.springframework.web.socket.server.standard;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
@@ -26,12 +26,11 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.support.ServerEndpointRegistration;
import static org.junit.Assert.*;
/**
* Test fixture for {@link org.springframework.web.socket.server.support.ServerEndpointRegistration}.
* Test fixture for {@link ServerEndpointRegistration}.
*
* @author Rossen Stoyanchev
*/

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.web.socket.server.endpoint;
package org.springframework.web.socket.server.standard;
import javax.websocket.server.ServerEndpoint;
@@ -29,7 +29,6 @@ import org.springframework.mock.web.test.MockServletContext;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.socket.server.support.SpringConfigurator;
import static org.junit.Assert.*;

View File

@@ -29,7 +29,7 @@ import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.sockjs.SockJsMessageDeliveryException;
import org.springframework.web.socket.sockjs.SockJsTransportFailureException;
import org.springframework.web.socket.sockjs.support.frame.SockJsFrame;
import org.springframework.web.socket.support.ExceptionWebSocketHandlerDecorator;
import org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator;
import static org.junit.Assert.*;
import static org.mockito.Matchers.*;

View File

@@ -29,7 +29,7 @@ import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSessionTests.TestWebSocketServerSockJsSession;
import org.springframework.web.socket.support.TestWebSocketSession;
import org.springframework.web.socket.handler.TestWebSocketSession;
import static org.junit.Assert.*;
import static org.mockito.Matchers.*;