From 3ac14e7cd85cbb7793f91d38058a904f1abd609e Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 3 Dec 2013 18:08:41 +0100 Subject: [PATCH] Document websocket XML namespace Issue: SPR-11063 --- .../MessageBrokerBeanDefinitionParser.java | 1 - .../config/WebSocketNamespaceUtils.java | 2 - .../socket/config/spring-websocket-4.0.xsd | 366 ++++++++++++++++-- 3 files changed, 333 insertions(+), 36 deletions(-) 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 f166903828..d3f3fe0aa5 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 @@ -264,7 +264,6 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser { cavs.addIndexedArgumentValue(1, handshakeHandler); } httpRequestHandlerDef = new RootBeanDefinition(WebSocketHttpRequestHandler.class, cavs, null); - // TODO: httpRequestHandlerDef.getPropertyValues().add("handshakeInterceptors", ...); } String httpRequestHandlerBeanName = registerBeanDef(httpRequestHandlerDef, parserCxt, source); diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java index 5e92bb6512..5f44c9e315 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java @@ -65,8 +65,6 @@ class WebSocketNamespaceUtils { if (sockJsElement != null) { ConstructorArgumentValues cavs = new ConstructorArgumentValues(); - // TODO: polish the way constructor arguments are set - String customTaskSchedulerName = sockJsElement.getAttribute("scheduler"); if (!customTaskSchedulerName.isEmpty()) { cavs.addIndexedArgumentValue(0, new RuntimeBeanReference(customTaskSchedulerName)); diff --git a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd index 53cd347ddd..08e6793c86 100644 --- a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd +++ b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd @@ -27,32 +27,60 @@ schemaLocation="http://www.springframework.org/schema/beans/spring-beans-4.0.xsd" /> + + + + + + + + + + + + + + + - + - + ]]> @@ -60,103 +88,293 @@ + + + + + + + A TransportHandler bean definition. + ]]> + ]]> + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + ]]> + ]]> @@ -168,9 +386,19 @@ + Otherwise a WebSocketHttpRequestHandler + will be registered for that purpose. + + See EnableWebSocket Javadoc for + information on code-based alternatives to enabling WebSocket support. + ]]> @@ -179,39 +407,111 @@ - + + + + + + See EnableWebSocketMessageBroker + Javadoc for information on code-based alternatives to enabling broker-backed messaging. + ]]> + + + - + + + + + - - - + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + +