language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | spring-projects | spring-framework | 34c95034d8437249b573912aaf275c0a734b15a7.json | Fix minor issue and polish | spring-websocket/src/main/java/org/springframework/websocket/server/support/WebSocketHttpRequestHandler.java | @@ -44,25 +44,26 @@
*/
public class WebSocketHttpRequestHandler implements HttpRequestHandler {
- private HandshakeHandler handshakeHandler;
+ private final HandshakeHandler handshakeHandler;
private final HandlerProvider<WebSocketHandler> handlerProvider;
public WebSocketHttpRequestHandler(WebSocketHand... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSockJsSession.java | @@ -129,13 +129,13 @@ public synchronized void sendHeartbeat() throws Exception {
}
protected void scheduleHeartbeat() {
- Assert.notNull(getSockJsConfig().getHeartbeatScheduler(), "heartbeatScheduler not configured");
+ Assert.notNull(getSockJsConfig().getTaskScheduler(), "heartbeatScheduler not configured");
... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java | @@ -25,15 +25,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
im... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsConfiguration.java | @@ -48,10 +48,8 @@ public interface SockJsConfiguration {
public long getHeartbeatTime();
/**
- * A scheduler instance to use for scheduling heartbeat frames.
- * <p>
- * By default a {@link ThreadPoolTaskScheduler} with default settings is used.
+ * A scheduler instance to use for scheduling heart-beat messa... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/main/java/org/springframework/sockjs/server/support/DefaultSockJsService.java | @@ -16,10 +16,15 @@
package org.springframework.sockjs.server.support;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Concur... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketConnectionManager.java | @@ -15,9 +15,11 @@
*/
package org.springframework.websocket.client;
+import java.util.ArrayList;
import java.util.List;
import org.springframework.http.HttpHeaders;
+import org.springframework.util.CollectionUtils;
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.Web... | true |
Other | spring-projects | spring-framework | 36148b7cb1066b77b7849f9852d36d0fcf0f5db0.json | Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods. | spring-websocket/src/test/java/org/springframework/sockjs/server/support/DefaultSockJsServiceTests.java | @@ -0,0 +1,55 @@
+/*
+ * 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
+ *
+ *... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/AbstractSockJsSession.java | @@ -22,6 +22,7 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
import org.springframework.websocket.CloseStatus;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.TextMessage;
import org.springframework.websocket.TextMessageHandler;... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSessionFactory.java | @@ -16,6 +16,7 @@
package org.springframework.sockjs;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketSession;
@@ -28,6 +29,6 @@
*/
public interface SockJsSessionFactory<S extends WebSocketSession>{
... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSockJsSession.java | @@ -25,6 +25,7 @@
import org.springframework.sockjs.AbstractSockJsSession;
import org.springframework.util.Assert;
import org.springframework.websocket.CloseStatus;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.TextMessage;
import org.springframework.websocket.WebSocke... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java | @@ -39,6 +39,7 @@
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -218,7 +219,7 @@ public void destroy() throws ... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsService.java | @@ -18,6 +18,7 @@
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -30,6 +31,6 @@ public interface SockJsService {
void hand... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/TransportHandler.java | @@ -18,6 +18,7 @@
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.sockjs.AbstractSockJsSession;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -31,6 +... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/support/DefaultSockJsService.java | @@ -21,7 +21,6 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.springframework.beans.factory.InitializingBean;
import org.springframework.http.Cookie;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@@ -43,6 +42,7 @@
import org.springfr... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/support/SockJsHttpRequestHandler.java | @@ -22,9 +22,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.http.server.... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpReceivingTransportHandler.java | @@ -27,6 +27,7 @@
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.sockjs.AbstractSockJsSession;
import org.springframework.sockjs.server.TransportHandler;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import com... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpSendingTransportHandler.java | @@ -28,6 +28,7 @@
import org.springframework.sockjs.server.SockJsConfiguration;
import org.springframework.sockjs.server.SockJsFrame;
import org.springframework.sockjs.server.SockJsFrame.FrameFormat;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
/**... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpServerSockJsSession.java | @@ -29,6 +29,7 @@
import org.springframework.sockjs.server.TransportHandler;
import org.springframework.util.Assert;
import org.springframework.websocket.CloseStatus;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
/**
@@ -49,9 +50,9 @@ public abstrac... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractStreamingTransportHandler.java | @@ -20,6 +20,7 @@
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.util.Assert;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -33,9 +34,9 @@ public ab... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/JsonpPollingTransportHandler.java | @@ -27,6 +27,7 @@
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.util.JavaScriptUtils;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -50,9 +51,9 @@ protected MediaType getConte... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/PollingServerSockJsSession.java | @@ -17,15 +17,16 @@
import org.springframework.sockjs.server.SockJsConfiguration;
import org.springframework.sockjs.server.SockJsFrame;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
public class PollingServerSockJsSession extends AbstractHttpServ... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/SockJsWebSocketHandler.java | @@ -17,8 +17,6 @@
package org.springframework.sockjs.server.transport;
import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -29,6 +27,7 @@
import org.springframework.util.Assert... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/StreamingServerSockJsSession.java | @@ -20,6 +20,7 @@
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.sockjs.server.SockJsConfiguration;
import org.springframework.sockjs.server.SockJsFrame;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -29,9 ... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/WebSocketTransportHandler.java | @@ -24,8 +24,10 @@
import org.springframework.sockjs.server.TransportHandler;
import org.springframework.sockjs.server.TransportType;
import org.springframework.util.Assert;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframework.webs... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/XhrPollingTransportHandler.java | @@ -23,6 +23,7 @@
import org.springframework.sockjs.server.SockJsFrame.FrameFormat;
import org.springframework.sockjs.server.TransportType;
import org.springframework.util.Assert;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -50,9 +51,9 @@ prot... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/HandlerProvider.java | @@ -5,90 +5,44 @@
* 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distri... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketClient.java | @@ -18,6 +18,7 @@
import java.net.URI;
import org.springframework.http.HttpHeaders;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketSession;
@@ -36,13 +37,10 @@
public interface WebSocketClient {
- W... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketConnectionManager.java | @@ -21,6 +21,7 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketSession;
+import org.springframework.websocket.support.SimpleHandlerProvider;
/**
@@ -32,7 +33,7 @@ public class WebSocketConnectionManager... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/AnnotatedEndpointConnectionManager.java | @@ -22,6 +22,8 @@
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.websocket.HandlerProvider;
+import org.springframework.websocket.support.BeanCreatingHandlerProvider;
+import org.springframework.websocket.support.SimpleHandl... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/EndpointConnectionManager.java | @@ -32,6 +32,8 @@
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.util.Assert;
import org.springframework.websocket.HandlerProvider;
+import org.springframework.websocket.support.BeanCreatingHandlerProvider;
+import org.springframework.websocket.support.SimpleHandlerProvider;
... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/StandardWebSocketClient.java | @@ -31,6 +31,7 @@
import org.springframework.http.HttpHeaders;
import org.springframework.web.util.UriComponentsBuilder;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketSession;
import org.springframework.... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/endpoint/WebSocketHandlerEndpoint.java | @@ -16,9 +16,6 @@
package org.springframework.websocket.endpoint;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
import javax.websocket.CloseReason;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
@@ -27,14 +24,15 @@
import org.apache.commons.logging.Log;
impo... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/DefaultHandshakeHandler.java | @@ -35,6 +35,7 @@
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -87,7 +88,7 @@ public String[] ge... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/HandshakeHandler.java | @@ -18,6 +18,7 @@
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -29,16 +30,8 @@
*/
public interface HandshakeHandler {
- /... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/RequestUpgradeStrategy.java | @@ -18,6 +18,7 @@
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
@@ -39,9 +40,9 @@ public interface RequestUpgradeStrategy {
* P... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/endpoint/EndpointRegistration.java | @@ -37,6 +37,8 @@
import org.springframework.util.Assert;
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.endpoint.WebSocketHandlerEndpoint;
+import org.springframework.websocket.support.BeanCreatingHandlerProvider;
+import org.springframework.websocket.support.SimpleHandle... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/support/AbstractEndpointContainerFactoryBean.java | @@ -1,88 +0,0 @@
-/*
- * 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
- ... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/support/AbstractEndpointUpgradeStrategy.java | @@ -22,6 +22,7 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;
import org.springframewo... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/server/support/WebSocketHttpRequestHandler.java | @@ -22,9 +22,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.http.server.... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/support/BeanCreatingHandlerProvider.java | @@ -0,0 +1,94 @@
+/*
+ * 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
+ *
+ *... | true |
Other | spring-projects | spring-framework | 84089bf3968443e4f6bb9239dace0692734d6578.json | Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.
HandlerProvider also provide... | spring-websocket/src/main/java/org/springframework/websocket/support/SimpleHandlerProvider.java | @@ -0,0 +1,61 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/HandlerProvider.java | @@ -17,6 +17,7 @@
package org.springframework.websocket;
import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
@@ -32,1... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/WebSocketHandshakeRequest.java | @@ -0,0 +1,48 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/AbstractWebSocketConnectionManager.java | @@ -5,25 +5,18 @@
* 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distri... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketClient.java | @@ -0,0 +1,48 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketConnectFailureException.java | @@ -0,0 +1,38 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/WebSocketConnectionManager.java | @@ -0,0 +1,76 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/AnnotatedEndpointConnectionManager.java | @@ -14,15 +14,10 @@
* limitations under the License.
*/
-package org.springframework.websocket.client;
+package org.springframework.websocket.client.endpoint;
-import java.io.IOException;
-
-import javax.websocket.DeploymentException;
import javax.websocket.Session;
-import org.apache.commons.logging.Log;
-i... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/EndpointConnectionManager.java | @@ -14,23 +14,19 @@
* limitations under the License.
*/
-package org.springframework.websocket.client;
+package org.springframework.websocket.client.endpoint;
-import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import javax.websocket.ClientEndpointConfig;
import javax.websocket.Cl... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/EndpointConnectionManagerSupport.java | @@ -0,0 +1,71 @@
+/*
+ * 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
+ *
+ *... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/StandardWebSocketClient.java | @@ -0,0 +1,105 @@
+/*
+ * 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
+... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/WebSocketContainerFactoryBean.java | @@ -0,0 +1,84 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/endpoint/package-info.java | @@ -0,0 +1,8 @@
+/**
+ * Client-side classes for use with standard Java WebSocket endpoints including
+ * {@link org.springframework.websocket.client.endpoint.EndpointConnectionManager} and
+ * {@link org.springframework.websocket.client.endpoint.AnnotatedEndpointConnectionManager}
+ * for connecting to server endpoint... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/client/package-info.java | @@ -1,6 +1,5 @@
-
/**
- * Client-side support for WebSocket applications.
+ * Server-side abstractions for WebSocket applications.
*
*/
package org.springframework.websocket.client; | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/endpoint/WebSocketHandlerEndpoint.java | @@ -54,8 +54,7 @@ public WebSocketHandlerEndpoint(WebSocketHandler webSocketHandler) {
@Override
public void onOpen(javax.websocket.Session session, EndpointConfig config) {
if (logger.isDebugEnabled()) {
- logger.debug("Client connected, WebSocket session id=" + session.getId()
- + ", path=" + session.get... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/server/endpoint/EndpointExporter.java | @@ -15,6 +15,10 @@
*/
package org.springframework.websocket.server.endpoint;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import javax.websocket.DeploymentException;
@@ -25,13 +29,13 @@
import org.apache.commons.logging.... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/server/endpoint/ServletEndpointExporter.java | @@ -1,60 +0,0 @@
-/*
- * 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
- *
- *... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/server/endpoint/ServletServerContainerFactoryBean.java | @@ -0,0 +1,133 @@
+/*
+ * 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
+... | true |
Other | spring-projects | spring-framework | 2046629945d288944b13401958f5d27e04bbe835.json | Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side. | spring-websocket/src/main/java/org/springframework/websocket/server/support/AbstractEndpointContainerFactoryBean.java | @@ -0,0 +1,88 @@
+/*
+ * 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
+ ... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/SockJsHandler.java | @@ -16,21 +16,36 @@
package org.springframework.sockjs;
+import org.springframework.websocket.CloseStatus;
+
/**
+ * A handler for SockJS messages.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface SockJsHandler {
- void newSession(SockJsSession session) throws Exception;
-
- void hand... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/SockJsHandlerAdapter.java | @@ -16,6 +16,8 @@
package org.springframework.sockjs;
+import org.springframework.websocket.CloseStatus;
+
/**
*
@@ -25,19 +27,19 @@
public class SockJsHandlerAdapter implements SockJsHandler {
@Override
- public void newSession(SockJsSession session) throws Exception {
+ public void afterConnectionEstab... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSession.java | @@ -18,19 +18,45 @@
import java.io.IOException;
+import org.springframework.websocket.CloseStatus;
+
/**
+ * Allows sending SockJS messages as well as closing the underlying connection.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface SockJsSession {
+ /**
+ * Return a unique SockJS ... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSessionFactory.java | @@ -18,6 +18,7 @@
/**
+ * A factory for creating a SockJS session.
*
* @author Rossen Stoyanchev
* @since 4.0 | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSessionSupport.java | @@ -16,9 +16,12 @@
package org.springframework.sockjs;
+import java.io.IOException;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
+import org.springframework.websocket.CloseStatus;
/**
@@ -99,33 +102,78 @@ protected void updat... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSockJsSession.java | @@ -26,6 +26,7 @@
import org.springframework.sockjs.SockJsSession;
import org.springframework.sockjs.SockJsSessionSupport;
import org.springframework.util.Assert;
+import org.springframework.websocket.CloseStatus;
/**
@@ -42,9 +43,9 @@ public abstract class AbstractServerSockJsSession extends SockJsSessionSuppo... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java | @@ -56,7 +56,7 @@
private static final int ONE_YEAR = 365 * 24 * 60 * 60;
- private String name = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
+ private String name = getClass().getSimpleName() + "@" + ObjectUtils.getIdentityHexString(this);
private String clientLibraryUrl = "https://d1... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpSendingTransportHandler.java | @@ -92,7 +92,7 @@ protected void handleNewSession(ServerHttpRequest request, ServerHttpResponse re
logger.debug("Opening " + getTransportType() + " connection");
session.setFrameFormat(getFrameFormat(request));
session.writeFrame(response, SockJsFrame.openFrame());
- session.connectionInitialized();
+ sessio... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpServerSockJsSession.java | @@ -29,6 +29,7 @@
import org.springframework.sockjs.server.SockJsFrame.FrameFormat;
import org.springframework.sockjs.server.TransportHandler;
import org.springframework.util.Assert;
+import org.springframework.websocket.CloseStatus;
/**
* An abstract base class for use with HTTP-based transports.
@@ -109,14 +1... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/SockJsWebSocketHandler.java | @@ -17,7 +17,6 @@
package org.springframework.sockjs.server.transport;
import java.io.IOException;
-import java.io.InputStream;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -30,6 +29,7 @@
import org.springframework.sockjs.server.SockJsFrame;
import org.springframework.util.Assert;
... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/WebSocketSockJsHandlerAdapter.java | @@ -17,7 +17,6 @@
package org.springframework.sockjs.server.transport;
import java.io.IOException;
-import java.io.InputStream;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -27,14 +26,15 @@
import org.springframework.sockjs.SockJsSessionSupport;
import org.springframework.sockjs.ser... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/WebSocketTransportHandler.java | @@ -50,9 +50,9 @@ public class WebSocketTransportHandler implements ConfigurableTransportHandler,
private SockJsConfiguration sockJsConfig;
- private final Map<SockJsHandler, WebSocketHandler> sockJsHandlers = new HashMap<SockJsHandler, WebSocketHandler>();
+ private final Map<SockJsHandler, WebSocketHandler> soc... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/CloseStatus.java | @@ -0,0 +1,192 @@
+/*
+ * 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
+... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/WebSocketHandler.java | @@ -16,24 +16,39 @@
package org.springframework.websocket;
-import java.io.InputStream;
/**
+ * A handler for WebSocket messages.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface WebSocketHandler {
- void newSession(WebSocketSession session) throws Exception;
-
- void handleTextMessag... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/WebSocketHandlerAdapter.java | @@ -16,7 +16,6 @@
package org.springframework.websocket;
-import java.io.InputStream;
/**
*
@@ -26,23 +25,23 @@
public class WebSocketHandlerAdapter implements WebSocketHandler {
@Override
- public void newSession(WebSocketSession session) throws Exception {
+ public void afterConnectionEstablished(WebSo... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/WebSocketSession.java | @@ -17,24 +17,60 @@
package org.springframework.websocket;
import java.io.IOException;
+import java.net.URI;
+import java.nio.ByteBuffer;
/**
+ * Allows sending messages over a WebSocket connection as well as closing it.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface WebSocketSession... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/endpoint/StandardWebSocketSession.java | @@ -17,14 +17,22 @@
package org.springframework.websocket.endpoint;
import java.io.IOException;
+import java.net.URI;
+import java.nio.ByteBuffer;
+
+import javax.websocket.CloseReason;
+import javax.websocket.CloseReason.CloseCodes;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFa... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/endpoint/WebSocketHandlerEndpoint.java | @@ -27,6 +27,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
+import org.springframework.websocket.CloseStatus;
import org.springframework.websocket.WebSocketSession;
import org.springframework.websocket.WebSocketHandler;
@@ -53,13... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/server/support/AbstractEndpointUpgradeStrategy.java | @@ -75,6 +75,6 @@ public void upgrade(ServerHttpRequest request, ServerHttpResponse response,
}
protected abstract void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response,
- String protocol, Endpoint endpoint) throws Exception;
+ String selectedProtocol, Endpoint endpoint) throws Exception... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/server/support/GlassfishRequestUpgradeStrategy.java | @@ -18,6 +18,7 @@
import java.lang.reflect.Constructor;
import java.net.URI;
+import java.util.Arrays;
import java.util.Random;
import javax.servlet.http.HttpServletRequest;
@@ -66,7 +67,7 @@ public String[] getSupportedVersions() {
@Override
public void upgradeInternal(ServerHttpRequest request, ServerHt... | true |
Other | spring-projects | spring-framework | ab5d60d343209832d3b27195fae8385b472a181b.json | Improve APIs for WebSocket and SockJS messages | spring-websocket/src/main/java/org/springframework/websocket/server/support/TomcatRequestUpgradeStrategy.java | @@ -51,7 +51,7 @@ public String[] getSupportedVersions() {
@Override
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response,
- String protocol, Endpoint endpoint) throws IOException {
+ String selectedProtocol, Endpoint endpoint) throws IOException {
Assert.isTrue(request inst... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSession.java | @@ -27,6 +27,8 @@
*/
public interface SockJsSession {
+ String getId();
+
void sendMessage(String text) throws IOException;
void close(); | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSessionSupport.java | @@ -114,6 +114,11 @@ public void delegateException(Throwable ex) {
this.sockJsHandler.handleException(this, ex);
}
+ public void connectionClosed() {
+ this.state = State.CLOSED;
+ this.sockJsHandler.sessionClosed(this);
+ }
+
public void close() {
this.state = State.CLOSED;
this.sockJsHandler.sessionC... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSession.java | @@ -58,10 +58,18 @@ public final synchronized void sendMessage(String message) throws IOException {
protected abstract void sendMessageInternal(String message) throws IOException;
+
+ @Override
+ public void connectionClosed() {
+ logger.debug("Session closed");
+ super.close();
+ cancelHeartbeat();
+ }
+
+ @O... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java | @@ -40,7 +40,6 @@
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
-import org.springframework.web.util.UriUtils;
/**
@@ -57,7 +56,7 @@
private static final int ONE_YEAR = 365 * 24 * 60 * 60;
- private final String prefi... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsService.java | @@ -31,8 +31,6 @@
*/
public interface SockJsService {
- String getPrefix();
-
/**
* Pre-register {@link SockJsHandler} instances so they can be adapted to
* {@link WebSocketHandler} and hence re-used at runtime when | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/support/DefaultSockJsService.java | @@ -70,13 +70,11 @@ public class DefaultSockJsService extends AbstractSockJsService implements Initi
private final Map<SockJsHandler, WebSocketHandler> sockJsHandlers = new HashMap<SockJsHandler, WebSocketHandler>();
- public DefaultSockJsService(String prefix) {
- super(prefix);
+ public DefaultSockJsService() ... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/support/SockJsHttpRequestHandler.java | @@ -46,30 +46,59 @@
*/
public class SockJsHttpRequestHandler implements HttpRequestHandler, BeanFactoryAware {
+ private final String prefix;
+
private final SockJsService sockJsService;
private final HandlerProvider<SockJsHandler> handlerProvider;
private final UrlPathHelper urlPathHelper = new UrlPathH... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpServerSession.java | @@ -108,6 +108,13 @@ private void tryFlushCache() throws IOException {
*/
protected abstract void flushCache() throws IOException;
+ @Override
+ public void connectionClosed() {
+ super.connectionClosed();
+ resetRequest();
+ }
+
+ @Override
protected void closeInternal() {
resetRequest();
} | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractSockJsWebSocketHandler.java | @@ -1,108 +0,0 @@
-/*
- * 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
- *
- ... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/SockJsWebSocketHandler.java | @@ -17,12 +17,18 @@
package org.springframework.sockjs.server.transport;
import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframewor... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/sockjs/server/transport/WebSocketSockJsHandlerAdapter.java | @@ -17,10 +17,16 @@
package org.springframework.sockjs.server.transport;
import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframewor... | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/websocket/WebSocketSession.java | @@ -27,6 +27,8 @@
*/
public interface WebSocketSession {
+ String getId();
+
boolean isOpen();
void sendText(String text) throws IOException; | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/websocket/endpoint/StandardWebSocketSession.java | @@ -40,6 +40,11 @@ public StandardWebSocketSession(javax.websocket.Session session) {
this.session = session;
}
+ @Override
+ public String getId() {
+ return this.session.getId();
+ }
+
@Override
public boolean isOpen() {
return ((this.session != null) && this.session.isOpen()); | true |
Other | spring-projects | spring-framework | 2794224b28430190c53c7cd284ccfe33c8eb5d1c.json | Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected. | spring-websocket/src/main/java/org/springframework/websocket/endpoint/WebSocketHandlerEndpoint.java | @@ -58,7 +58,7 @@ public void onOpen(javax.websocket.Session session, EndpointConfig config) {
try {
WebSocketSession webSocketSession = new StandardWebSocketSession(session);
this.sessions.put(session.getId(), webSocketSession);
- session.addMessageHandler(new StandardMessageHandler(session.getId()));
+ ... | true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-web/src/main/java/org/springframework/http/server/AsyncServletServerHttpRequest.java | @@ -116,21 +116,35 @@ public void completeAsync() {
// Implementation of AsyncListener methods
// ---------------------------------------------------------------------
+ @Override
public void onStartAsync(AsyncEvent event) throws IOException {
}
+ @Override
public void onError(AsyncEvent event) throws IOE... | true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-web/src/main/java/org/springframework/http/server/ServerHttpResponse.java | @@ -17,6 +17,7 @@
package org.springframework.http.server;
import java.io.Closeable;
+import java.io.IOException;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.HttpStatus;
@@ -35,6 +36,11 @@ public interface ServerHttpResponse extends HttpOutputMessage, Closeable {
*/
v... | true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-web/src/main/java/org/springframework/http/server/ServletServerHttpResponse.java | @@ -80,6 +80,13 @@ public OutputStream getBody() throws IOException {
return this.servletResponse.getOutputStream();
}
+ @Override
+ public void flush() throws IOException {
+ writeCookies();
+ writeHeaders();
+ this.servletResponse.flushBuffer();
+ }
+
public void close() {
writeCookies();
writeHeade... | true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-websocket/src/main/java/org/springframework/sockjs/SockJsSession.java | @@ -16,6 +16,8 @@
package org.springframework.sockjs;
+import java.io.IOException;
+
/**
@@ -25,7 +27,7 @@
*/
public interface SockJsSession {
- void sendMessage(String text) throws Exception;
+ void sendMessage(String text) throws IOException;
void close();
| true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSession.java | @@ -17,6 +17,8 @@
package org.springframework.sockjs.server;
import java.io.EOFException;
+import java.io.IOException;
+import java.net.SocketException;
import java.util.Date;
import java.util.concurrent.ScheduledFuture;
@@ -54,20 +56,25 @@ protected SockJsConfiguration getSockJsConfig() {
return this.sockJs... | true |
Other | spring-projects | spring-framework | 3a2c15b0fd5d370f80964b8f4d62b353823e06cf.json | Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOEx... | spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java | @@ -214,50 +214,57 @@ public final void handleRequest(ServerHttpRequest request, ServerHttpResponse re
request.getHeaders();
}
catch (IllegalArgumentException ex) {
- // Ignore invalid Content-Type (TODO!!)
+ // Ignore invalid Content-Type (TODO)
}
- if (sockJsPath.equals("") || sockJsPath.equals("/... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.